I agree that marking certain paragraphs with "class" tags is a good way to organize a site, but I find that individual tagging gets to be cumbersome when you're working with any kind of site that involves long stretches of text.
On the one hand, you have (for example) a play, where it makes sense to class each spoken item according to the speaker; on the other hand, you have (for example) a site with a navigation bar, a section/subsection description, some body text and a footer. Within the body section, classed paragraphs make sense (especially if you want to be able to emphasize or otherwise partition an abstract, or a section of great interest), but in the infrastructure I find that classed "div" tags make a lot more sense.
My current example is this: I'm building a website for my "beginners Japanese" class, and a classmate of mine is helping out with the graphic design and some of the site content (typing up class notes and the like). He's actually quite good with graphics, whereas they scare me (I routinely use Lynx and w3m, and I'm working on getting links to behave properly under win32. Mozilla and K-meleon are my favoured graphical environments). Since I can create multi-classed "div" elements (i.e. one div that belongs to the class "graphical" as well as the class "footer"), it's very simple to have a single document that contains both layouts which can be easily selected (one stylesheet that has "display: none;" set for the class of navigation aids that I do not want).
This is admittedly not an ideal solution - it doesn't work tremendously well within browsers that don't support stylesheets at all because some navigation elements are duplicated (in retrospect, I should probably be more fine-grained in my classing - that is, class the individual images instead of an entire duplicated navigation section... interesting. I'll have to see what I can put together with that. At the very least it would be more friendly towards Lynx) - but it has definite benefits (if, for example, you want to print out last weeks notes without any of the navigational or site-specific content, you can simply select a stylesheet that hides everything except the "body" section).
I think that structured information is one of the most powerful concepts imagined by humanity. It allows information to transcend individuals: books from hundreds of years ago can still educate, entertain and challenge people of today, and do so in the future as well; programs can be written and shared, made to run on multiple architectures in order to provide a consistent environement suite of tools to the user; the vast repository of information that is the internet can be navigated with the aid of programs that can parse partial meaning out of the soup of documents present online.
This last example is flawed, however - programs can't aid our navigation of the internet as well as they ought to be able to, and the root of this is the glut of documents that have been written with no particular structure in mind. People need to understand that writing structured information (in this case, I'm arguing in favour of standards-compliant HTML, but a sufficiently-structured document should retain its structure in a cross-format fashion - if someone writes a text file in an organized, consistent fashion, it's usually a trivial matter to write a sed or awk script that transforms it into valid, structured HTML... and vice-versa) is not just a laudable goal but a practical necessity for information to be useful!
Is it so very hard to write simple, standards-compliant HTML? In my experience, at least, it is easier to write a simple, clean (well, in my case that would instead be rather Spartan) and streamlined HTML file that is compliant than a hard-to-navigate, graphics-laden, bandwidth-saturating monster of a page in any case. The code is more quickly finished; the page (and the surrounding site) is usually more navigable, pleasant and useful; the resulting collection of files is more easily modified "en masse". What I don't understand is that given all of these (admittedly anecdotal) incentives, why is there still such a profusion of montrosities out there? It's enough to make one weep.
[ Parent ]