Semantic Vs Presentational

From CSS Discuss

Jump to: navigation, search

Yes, and the extensibility of XML is similar (at least in this one regard), but the problem here is that if there is no pre-existing semantics, *all* the user agent has to go on for rendering is the author stylesheet-- there can be no fully tailored user or user agent style.

This brings back some of the same accessibility and customization issues that exist with tag soup; a user agent in a medium for which you don't have an author style can't do quite as much to render the page. It's not as bad, since a user agent is likely to be able to do *something* sensible even without an author style if the page is well-designed, but the fact remains that a significant part of the document structure is being communicated only through presentational cues.

However, I see no satisfactory alternative to this. It would be theoretically possible to design a library of hundreds and thousands of standard HTML classes (or XML tags) that would have agreed-on semantics, but it's unlikely that this could be implemented well in practice.

This is the main reason why I see the total separation of content and presentation as more a worthy ideal, to keep in mind while producing code for a compromised world, than a realizable goal. When doing anything nontrivial, you're likely at some point to mold a slightly suboptimal choice of tag, or a semantically void thing like DIV, into what you want in a way that is purely presentational, so in a sense some of the content is being transmitted through the stylesheet.

This is not to say that the notion should be abandoned entirely. There are lots of worthy ideals that get compromised in the real world.

Personal tools