For example: <div/> instead of <div></div>.
I did this and apparently the HTML5 validator passed this as valid. I was wondering it this is actually true?
PS: I’m serving page as application/xhtml+xml
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is not valid HTML 5 (HTML does not allow shorttags, the equivalent HTML construct is a single opening
divtag). It is valid XHTML 5, as it is valid XML.The reason why you might see this pass through a validator just fine is because of what you stated:
Which means that you tell the validator that it must treat your markup as XML. In other words your page is not HTML 5 at all.