I'm used to teaching others about the importance of writing good html code, by forcing them to use the http://validator.w3.org for checking if they forgot to close a tag.
This works great when using xHTML1 Strict, but I'd like to use the HTML5 doctype and tags where possible.
The validator does not report opening a <p>
tag without closing it to be an error.
Is this normal in HTML5 or is the validator not working properly?
The validator is likely working correctly:
A p element’s end tag may be omitted if the p element is immediately followed by an address, article, aside, blockquote, dir, div, dl, fieldset, footer, form, h1, h2, h3, h4, h5, h6, header, hr, menu, nav, ol, p, pre, section, table, or ul element, or if there is no more content in the parent element and the parent element is not an a element.
From: http://www.w3.org/TR/html-markup/p.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With