I often write comments like this <div id=wrapper>...</div> <!-- id=wrapper -->But what if I wrote them like this?<div id=wrapper>...</div id=wrapper>At first it seems dangerous to put an id attribute that has the same value on another tag, but then, doesn't the browser throw out that information? As far as I can see Chrome and Firefox both disregard any attributes in the closing tag.Also seems unfortunate that it's not a real comment. It wont be parsed semantically as a comment. But I don't think anyone is using that space for anything else, right? Closing tags only close, right?Is there any reason not to do this other than it's not a standard?
Is there anything wrong with putting comments in an HTML closing tag?
html;comments;standards;browser
This scenario is not covered in the spec: http://www.w3.org/html/wg/drafts/html/master/syntax.html#end-tagsMoreover, the next section in the spec (Attributes) claims that attributes must be in start tags. Since your proposal doesn't respect the spec, I strongly recommend against it. 