Glen Lipka schrieb:
> Isn't it invalid Xhtml, not invalid html?

What is the difference really, if it's invalid? And if it were XHTML, 
XHTML as XML that is, the page wouldn't even render. If it's served as 
text/html it is HTML, no matter what Doctype you put on top and the 
browser will use its tagsoup parser for building the tree.

> There has been a whole slew of expandos posts that say its basically 
> fine for most primitive uses.

I think you mean using primitives as expandos to avoid memory leaks. But 
that's a completely different story and your HTML is still not valid. 
This shouldn't be mixed up.

I'd never rely on an invalid DOM, and please consider upcoming Specs - 
especially if you're patching form elements - before using custom 
attributes otherwise you may run into trouble:

http://my.opera.com/hallvors/blog/show.dml/476181

> What is the case if you put like <input rel="" />  And search for rel.  
> In this case, it is perfectly valid XHTML.

No, it's not. input elements do not have a rel attribute.
http://www.w3.org/TR/html401/interact/forms.html#h-17.4

I really wonder why people tend to refuse to use the class attribute for 
these kind of things. It's a common misunderstanding that classes are 
for style.


-- Klaus

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to