microformats2-linting: Difference between revisions
Jump to navigation
Jump to search
(drafting some linting rules) |
(created published updated) |
||
Line 8: | Line 8: | ||
# A non-nested <var>h-entry</var> should be on an article. | # A non-nested <var>h-entry</var> should be on an article. | ||
# If the outer <var>h-entry</var> is an article element, arguably nested <var>h-entry</var>s should also be articles. This is explicitly recommended by §4.3.2 of HTML5. | # If the outer <var>h-entry</var> is an article element, arguably nested <var>h-entry</var>s should also be articles. This is explicitly recommended by §4.3.2 of HTML5. | ||
# | # <var>dt-created</var> <= <var>dt-published</var> <= <var>dt-updated</var>. |
Revision as of 14:42, 12 July 2015
This page is to work out possible rules for a future microformats2 linter/validator.
The job of a linter or validator is to help the user correctly implement microformats2 on their site by making helpful (if somewhat pedantic) comments about the markup.
Possible linting rules
- If a document has an h-feed class, it shouldn't have any h-entry elements that are not children of the h-feed.
- A non-nested h-entry should be on an article.
- If the outer h-entry is an article element, arguably nested h-entrys should also be articles. This is explicitly recommended by §4.3.2 of HTML5.
- dt-created <= dt-published <= dt-updated.