Is there a validator specifically for XHTML 5, i.e. the XML serialization of HTML 5? The W3C validator supports the document types:
HTML 5 (experimental)
: <br>
tags.XHTML 1.0
and XHTML 1.1
doctypes, which don't recognize the new tags in HTML 5.You can use Validator.nu (X)HTML5 Validator (Living Validator):
http://html5.validator.nu/
Note that the "living validator" means that since the HTML 5 spec itself is constantly evolving, so does the validator - the results of your validation can change with the passing of time (invalid markup may become valid and otherwise).
Also, note that the W3C Markup Validation Service explicitly states after the validation:
The document located at <...> was successfully checked as HTML5. This means that the resource in question identified itself as "HTML5" and that we successfully performed a formal validation of it. The parser implementations we used for this check are based on validator.nu (HTML5).
So Validator.nu actually is the (X)HTML5 validator.
The W3C validator for HTML 5 in fact does detect and validate XHTML 5:
application/xhtml+xml
).xmlns
attribute is present in the file. That is,This is identified as XHTML (and is therefore correctly marked invalid):
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>test</title></head>
<body><br></body></html>
This is identified as HTML (and is therefore correctly marked valid):
<!DOCTYPE html><html>
<head><title>test</title></head>
<body><br></body></html>
Edit: Apparently they're removing this auto-identification. See this bug.
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