问题
I wrote some HTML code with out a DTD (rendered via quirks mode). Sorry. Now I want to have it validated in XHTML Strict 1.0 so I added the DTD tag
I've carried these steps to make the code "clean".
- Verified proper nesting
- Verified proper closure of tags
- Verified proper closure of empty tags
- Verified lower case
- Verified single root element
Where can I go to validate the code?
回答1:
If you wish to validate your html, use http://validator.w3.org/
回答2:
If you really want to your code to valid then write for XHTML 1.1 and send as application/xhtml+xml. Your browser will show you where the first error occurs and it will stop parsing the code at that point.
来源:https://stackoverflow.com/questions/6103925/updating-code-from-quirks-mode-to-xhtml-1-0-strict-where-to-validate