[thelist] semantic markup

Maximillian Schwanekamp anaxamaxan at neptunewebworks.com
Thu May 27 11:07:13 CDT 2004


-------------------------------------
It's not so much how I want it to be rendered as it is that <li> is
supposed to be somehow "more correct" than whatever else, as if all
lists have to be built as bullet lists. What I mean is, the <ul> or
<ol> is a type of list, and it's somehow considered properly semantic
to use them to create user interface controls. That doesn't seem
semantic to me at all. If anything, the <button> tag seems more proper.
-------------------------------------

Quite true.  Eric Meyer in one of his books [1] actually uses another
method, with something like this:
<div id="nav">
  <a href="#">one</a><b>|</b>
  <a href="#">two</a><b>|</b>
  <a href="#">three</a>
</div>

div#nav b { display: none; }
div#nav a { display: block; }

This produces a vertical nav list for modern CSS-enabled browsers, but a
horizontal list elsewhere. (The B is there only to have an element to
style - STRONG would work too, but it's longer!)  I am not sure that a UL/OL
list is semantically any more correct either - lists are demonstrative in
normal prose, whereas nav elements are usually somewhat passive - except
maybe those really video-gamey Flash nav bars in some web templates!  The
question of semantic "correctness" in code only goes so far before it starts
breaking down.  X/HTML was created by geeks (albeit visionary ones), not
philosophers.  Prob get flamed for this post, but oh well.

[1] Eric Meyer on CSS, New Riders.

Maximillian Von Schwanekamp
Dynamic Websites and E-Commerce
www.NeptuneWebworks.com
voice: 541-302-1438
fax: 208-730-6504






More information about the thelist mailing list