Meta tags itemprop

32,643

You should leave both of them. The Microdata Spec says:

If a meta element has an itemprop attribute, the name, http-equiv, and charset attributes must be omitted, and the content attribute must be present.

so it would be invalid to merge them.

Share:
32,643

Related videos on Youtube

pessi
Author by

pessi

Updated on June 29, 2020

Comments

  • pessi
    pessi almost 4 years

    I am trying to include extracted structured data in my webpages.

    I included this for description:

    <meta itemprop="description" content="my description" />
    

    However I realised that there is already a normal meta description on the page:

    <meta name="description" content="my description" />
    

    Is it ok to leave both of them or it is really necessary to merge them together maybe like:

    <meta itemprop="description" name="description" content="" />
    
  • Michaël van de Weerd
    Michaël van de Weerd almost 8 years
    Tell me if I'm wrong, but the quoted text clearly states that the name, http-equiv and charset attributes must be omitted, so leaving both the itemprop and name attribute is invalid.
  • WeNeigh
    WeNeigh almost 8 years
    @MichaëlvandeWeerd I parsed that statement similarly - I think the recommended practice then would be to have two meta tags, one with the itemprop and content, and another with name and content.
  • Alohci
    Alohci almost 8 years
    @WeNeigh - Correct.