From: Garrett Smith on 29 Mar 2010 17:39 Thomas 'PointedEars' Lahn wrote: > Garrett Smith wrote: > >> Not only does HTML 4 explicitly allow class to be used for reasons other >> than CSS, it is actually used for such ulterior purposes. Microformats, >> for example, utilize class attribute in HTML. > > Microformats are not based on semantic markup; they are a design mistake. Can you elaborate how and why? -- Garrett comp.lang.javascript FAQ: http://jibbering.com/faq/
From: Hans-Georg Michna on 29 Mar 2010 17:40 On Mon, 29 Mar 2010 13:36:41 -0400, David Mark wrote: >Michael Haufe ("TNO") wrote: >> On Mar 29, 9:33 am, Hans-Georg Michna <hans- >> georgNoEmailPle...(a)michna.com> wrote: >>> I'm not so sure about that. Sometimes you just need some element >>> grouping, and that is, generally speaking, what the class >>> attribute is for. >> I believe a different attribute should have been used for that >> purpose. In SVG, the <g/> tag is used for example. In MXML there is a >> groupName attribute (for some elements at least). >>> Whether you then give that group a style or a JavaScript >>> treatment shouldn't matter too much, I think. It is certainly >>> well within the standards to give some elements class >>> attributes, whether they are used in CSS or not. >> Just because its a standard doesn't make it ok. >Ain't that the truth! :) Assuming you want to group a couple of elements in an HTML page for some purpose, let's say something to be done to them using JavaScript. Assume these elements are otherwise unrelated and cannot easily be found by other means, so you have to give them some kind of marker to be able to find them easily. How would you do that? I would give them a class attribute and a particular string in that attribute, and I still think this is pretty much what class is meant for. Hans-Georg
From: "Michael Haufe ("TNO")" on 29 Mar 2010 17:53 On Mar 29, 4:02 pm, Hamish Campbell <hn.campb...(a)gmail.com> wrote: > Eh? It's not meta-data - it's an arbitrary grouping reference that > means whatever you need it to mean. "Eh? It's not meta-data, its meta-data..." > That *is* its purpose. It's purpose is confused. > Presumably you wrote the HTML, so complaining that you can't then determine the > datamodel (?) by evaluating the stylesheet (?) is a straw man argument. So you're argument is that the datamodel should be defined and/or described by the stylesheet? Nonsense.
From: "Michael Haufe ("TNO")" on 29 Mar 2010 17:57 On Mar 29, 1:45 pm, Garrett Smith <dhtmlkitc...(a)gmail.com> wrote: > The problem with that example does not use semantic class names. > > Meaningless class names can make the code totally confusing. The problem is that semantics and presentation are bound up with one another.
From: "Michael Haufe ("TNO")" on 29 Mar 2010 18:51
On Mar 29, 4:40 pm, Hans-Georg Michna <hans- georgNoEmailPle...(a)michna.com> wrote: > Yes, that sounds sensible. The sad thing is that it takes at > least 5, probably 10 years or more until almost all browsers on > the Internet adhere to a thus improved standard. > > By that time we may have given up on HTML, CSS, and JavaScript > altogether. Browser evolution is by far better these days, I don't think it'll be 10 years. Maybe not even 5 years if Microsoft can keep up its current pace, or do better. |