Re: [VE][html5] XHTML5 content-type value

On 26 Feb 2010, at 11:11, David Oliver wrote:

> Validating http://project-start.doliver.co.uk/
> Error [html5]: "
> Line 5, Column 67: Bad value content-type for attribute http-equiv on XHTML element meta.
> 
> …v="content-type" content="application/xhtml+xml"/>
> "
> 
> My document isn't recognised as XHTML5 but, instead, as HTML5.


To paraphrase the spec:

"If you use http-equiv="content-type", then it must be text/html and may include a character encoding. You must not use this if you are writing an XML document."

http://www.w3.org/TR/html5/semantics.html#attr-meta-http-equiv-content-type

So the error is right, that is a bad value for the element. I don't know if the checker does XHTML5 checking - to test that you could create an HTML5 document that isn't well formed XHTML (e.g. with a <br> (and not a <br/> or </br>)) and serve it as application/xhtml+xml.

-- 
David Dorward
http://dorward.me.uk

Received on Friday, 26 February 2010 12:28:39 UTC