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.
Related videos on Youtube
Author by
pessi
Updated on June 29, 2020Comments
-
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 almost 8 yearsTell me if I'm wrong, but the quoted text clearly states that the
name
,http-equiv
andcharset
attributes must be omitted, so leaving both theitemprop
andname
attribute is invalid. -
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 almost 8 years@WeNeigh - Correct.