Attributes in closing element tags?
5 answers
No, it is not. You must use the attributes in the opening tag.
Running <a>test</a href="tst.html"> in the w3c validator results in this error:
Invalid name start character: only S delimiters and TAGC are allowed
Where s separators and tagc:
S is "whitespace" separator [5] s = SPACE | (32) space RE | (13) CR RS | (10) LF SEPCHAR (9) HT -- http://xml.coverpages.org/sgmlsyn/sgmlsyn.htm#C6.2.1 TAGC ">" -- http://www.w3.org/TR/sgml.l +9
Attributes should appear in the start tag of the element. W3C citation : on SGML and HTML attributes :
... Attribute / value batches appear before the final ">" of the element's initial tag. In the elementβs start tag, any number of (pair) attribute pairs may appear, separated by spaces. They can appear in any order.
+2
Closing tags may not contain attributes. But in HTML4 you can omit LI closure:
<!ELEMENT LI - O (%flow;)* -- list item --> <!ATTLIST LI %attrs; -- %coreattrs, %i18n, %events -- > Start tag: required, End tag: optional In XHTML you cannot.
0