Mathew Patterson wrote:
You have probably heard this same argument in reference to using
<strong> instead of <b> . The idea is that the class name you use
should reflect the semantic *meaning* of what it does, not
necessarily the physical way it achieves that meaning.
The idea is fine and recommendable. However, while <b> may be
depreciated as an element with purely visual "meaning", it isn't
deprecated - yet. If "purely visual" is all we want, then <b> is as
"meaningful" - although not as versatile - as a <span> with a
class-name. A meaningful element like <strong>, with or without added
styles, may after all not be what we want in all cases.
----
Personally, when IDs and classes has to stay "movable", which they
should be in most cases, then I tend to fall back to "easy to find but
otherwise not semantically loaded" names.
While 'header' and 'footer' tend to be called just that (for no obvious
reason), content-containers and other major containers are often named
'content', 'add1', 'add2' and so on depending on where they are in the
source-code and what they are meant to carry.
Similarly: if I add a class to an element in a single page, then I may
either name that class something like 'int01' and add the style in the
page-head, or name it 'extXX' (where XX is a suitable number) and keep
the style in a reserved section of my stylesheet. Such names carry no
meaning, but they are easy to keep track of between source-code and
stylesheets.
One can go overboard with semantics, and regardless of how one organize
and reorganize and add semantics into source-code and stylesheets, the
"meaningful" ID and class names may become "completely meaningless"
under certain condition. Linking them in a purely "where is your
counterpart" way won't be affected though, since there is no other
meaning implied.
----
Probably someone who might like to tell an old programmer that he has
lost track when it comes to semantics, but I think a certain form of
semantics should be applied where it has "a meaningful place", and
another one where needed. I think "semantics" has to make sense ;-)
regards
Georg
--
http://www.gunlaug.no
*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************