Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inconsistent use of span / meta, best practice #1678

Closed
CEWebDesign opened this issue Jun 27, 2017 · 4 comments
Closed

inconsistent use of span / meta, best practice #1678

CEWebDesign opened this issue Jun 27, 2017 · 4 comments
Labels
no-issue-activity Discuss has gone quiet. Auto-tagging to encourage people to re-engage with the issue (or close it!).

Comments

@CEWebDesign
Copy link

CEWebDesign commented Jun 27, 2017

Following (inconsistent?) use of span / meta is not clear to me:
Are all these examples (from data/example.txt) valid and best practice?

<span itemprop="priceCurrency" content="USD">$</span>
<span itemprop="priceCurrency" content="USD" />$
<meta itemprop="priceCurrency" content="USD" />$

<span property="price" content="13.00" />
<meta property="price" content="13.00" />

@unor
Copy link
Contributor

unor commented Jun 30, 2017

<span itemprop="priceCurrency" content="USD">$</span>

Invalid, because in HTML+Microdata the content attribute is only allowed on the meta element. (There are plans to change this: w3c/microdata#20.)

<span itemprop="priceCurrency" content="USD" />$

Invalid, for the reason mentioned above (content attribute) and because the span element needs a closing tag.

<meta itemprop="priceCurrency" content="USD" />$

Valid.

<span property="price" content="13.00" />

Invalid, because the span element needs a closing tag. (In HTML+RDFa the content attribute is allowed on every element.)

<meta property="price" content="13.00" />

Valid.

@CEWebDesign
Copy link
Author

@unor Thank you very much.
I changed invalid tags in data/example.txt #1676
I hope it helps in case someone needs valid output.

@github-actions
Copy link

This issue is being tagged as Stale due to inactivity.

@github-actions github-actions bot added the no-issue-activity Discuss has gone quiet. Auto-tagging to encourage people to re-engage with the issue (or close it!). label Jul 21, 2020
@RichardWallis
Copy link
Contributor

Conversation now transferred to PR #1675

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-issue-activity Discuss has gone quiet. Auto-tagging to encourage people to re-engage with the issue (or close it!).
Projects
None yet
Development

No branches or pull requests

3 participants