Updating code from Quirks Mode to XHTML 1.0 Strict - Where to Validate?

喜欢而已 提交于 2019-12-10 14:57:08

问题


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".

  1. Verified proper nesting
  2. Verified proper closure of tags
  3. Verified proper closure of empty tags
  4. Verified lower case
  5. 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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!