Archive for the 'standards' Category

Standardizing Nomenclature

Monday, June 20th, 2005

I agree with Richard: peoples’ eyes do glaze over when you say “semantic,” but they don’t have to. When Molly & I co-teach or when I am on my own, I always try to strike a balance by alternating “meaningful” and “semantic.” I feel it is important that “semantic” does not go away because it does have value. That said, it is necessary to relate to your audience, no matter what their level or experience, so I think alternating the terms and showing the interchangability of the two is beneficial for everyone.

It is also very important to stress the difference between “structure” and “semantics.” Way too many people (myself included) have used these terms interchangably, when they are not the same. “Semantics” is about meaning whereas “structure” deals with the framework of your markup. Some say structure has only to do with your XHTML skeleton (DOCTYPE, <HTML>, <head> & <body>), but I view a page like a house. To me the “structure” is the framing upon which you build your roof, walls and floors. In XHTML, that translates not only to your document skeleton, but also to how you use <div>s to “frame” your content, how you use heading tags to designate content sections, etc.

Confusion arises in some cases when elements are both. In the case of heading tags, they are semantically meaningful (each tag conveying the relative importance of the heading it wraps in relation to the document and the other headings) and structural (forming the document outline). Additional confusion seeps in when we discuss how structural <div>s should be id-ed or class-ed semantically.

These sorts of nomenclature confusion are things we need to overcome. Our industry is still very new and we are all learning a little more every day. Sharing a common language is very important for effectively communicating (especially in our global community) and is something I think needs to be stressed even more as we move forward. I think this is yet another area where we need to establish standards and, by having discussions like this, we are taking the first steps toward establishing those.

Trash + DOM = Treasure?

Thursday, May 26th, 2005

I was browsing the popular links on del.icio.us today and stumbled onto Nifty Corners and (via that page) More Nifty Corners. I have to say that I am incredibly impressed with the scripting, but I fear there is something wrong with this picture.

Lately, there have been some border wars over the CSS :hover pseudo-class and its forays into the behavior layer. Sure, it’s easier to have CSS do the work sometimes, but that doesn’t make it right. Frankly, I agree with the concept that behavior should be separated from presentation, just as presentation should be separated from content (which is why I use JavaScript to open and close the faux-<select> in my <select> Something New series).

I am also a big believer in clean, semantic markup, so I become concerned when anyone is adding superfluous code to the document to force a design issue. I know some might say I live in a glass house, but when I see someone putting code like this

<div id="container">
  <b class="rtop">
    <b class="r1"></b> <b class="r2"></b>
    <b class="r3"></b> <b class="r4"></b>
  </b>
  <!--content goes here -->
  <b class="rbottom">
    <b class="r4"></b> <b class="r3"></b>
    <b class="r2"></b> <b class="r1"></b>
  </b>
</div>

into their document (even if it is via the DOM), I begin to shudder. Maybe it’s the nagging purist in me, but that just seems wrong.

Are we falling into the old patterns again, forcing design issues through hacky markup? Does the use of non-semantic markup (taking a page from Eric, no doubt) make it OK? Does the fact that it’s inserted via the DOM make it any more valid? Where do we draw the line?

I don’t have the answer, but I think we need to have the conversation.