Ian from Sweden answers my question as to whether you can close attributes: Is this legal?.
Thanks Ian – and damn I hate the fact that you have to count tags to find which one a closing tag relates to. Style sheets might as well consist of curly brackets.
“Unfortunately, David, classified span endtag isn’t legal. Not in HTML 4.01, which is the latest standard I stick to, and thus hardly in newer, that tend to be ever more restrictive than previous ones. I created a shell html doc with that item and sent it to validation…. alas, the syntaxnazis have again won this time.
So your only legal parsable recourse is this kludge:
<span class="foo">bar</span><!–</span class="foo">–> “