0 reply content:
If you are impatient, you can jump to the conclusion.
Empty elements must either have an end tag or the start tag must end with/>. For instance,
Or. See HTML Compatibility GuidelinesFor information on ways to ensure this is backward compatible with HTML 4 user agents.
CORRECT: terminated empty elements
INCORRECT: unterminated empty elements
Http://www.w3.org/TR/xhtml1/
According to the XHTML standard,
Is incorrect
According to the HTML 4.01 standard,
Is incorrect
Based on http://validator.w3.org/
Detection results:
Doctype: XHTML 1.0 Strict:
Is the correct method, and
Yes.
Is the correct method, and
Yes.
Doctype: HTML 4.01 Strict:
Is the correct method, and
Yes.
The XHTML declared by W3C is also written in accordance with the XHTML standard.
Http://www.w3.org/TR/html401/sgml/dtd.html
This is a W3C page that uses HTML 4.01.
Note: Tag syntax, Declare HTML4.01, also use HTML 4.01 standard to write, correct.
No one is right or wrong. The key is the doc type you declare.
Once you declare which side of your website you will use, it will be wrong if you know it is wrong.@ Lin can bin:
Zhihu, declared HTML5, but used
(HTML5 errors)
Lin is wrong (Mom and Dad deny others' denial)
Refer:
1. Historical Development of html standards: HTML tags, closed or not closed?
2. google-styleguide:
Http://google-styleguide.googlecode.com/svn/trunk/htmlcssguide.xml? Showone = Document_Type # Document_Type
Yes. If the browser is not closed, it will determine where it is closed, increasing the running cost.