Le 10/11/2011 14:58, Martin Grigorov a écrit :

I thought that any self closing tag was invalid in any html version,
html 4 as of html 5.

But the validator is ok with self closing br and link in html 5, and the
html 5 draft recommandation says very clearly self closing tags are
allowed for "void elements" (which br and link are part of) - just to
remember : http://www.w3.org/TR/html5/syntax.html#syntax-start-tag, point 6.

For HTML 4, the self-closing tags are not valid in the validator (br as
link), and the recommandation is pretty clear to my opinion :
http://www.w3.org/TR/html4/intro/sgmltut.html#didx-element-3.



I guess you mean: "Such empty elements never have end tags."
<link ... /> has no end tag.


Do you refer to the HTML 4 recommandation I pointed, and the phrase :
"Some HTML element types have no content. For example, the line break element 
BR<http://www.w3.org/TR/html4/struct/text.html#edef-BR> has no content; its 
only role is to terminate a line of text. Such empty elements never have end 
tags."

It says no end tags, and don't say you have to "self-close" the start tag. The 
others recommandations states clearly an empty element can (for html 5) and 
must (for xhtml) has a "/" caracter in the start tag ending.
If we admit what is admit is what is written, then the HTML4 recommandation is 
clear on this point, right ?

Reply via email to