[thelist] HTML as data structure

aardvark roselli at earthlink.net
Sun Aug 11 12:03:16 CDT 2002

> From: Mark Gallagher <mark at cyberfuddle.com>
> Close.  XML and HTML are both used for structure and semantics -
> they're two separate markup languages.  It's like, oh, comparing PHP
> and Perl :-).

thinking of HTML as a subset of SGML, and XHTML as a subset of XML
has helped some people over here understand it better...

> If possible.  Unfortunately, sometimes you'll need to communicate
> something which doesn't exist in HTML: for example, if you wish to
> specify a group of elements as a menu, there's no way of saying
> <content> for your main content, and <menu> for your menus.  The usual
> way is to use <div>s - <div id="content"> <div id="menu">.

there is a <menu> element, although it is deprecated in HTML4.01:

some people like to find more semantically appropriate elements for
their navigation, which is why so many people are wrangling with
using <ul> or <ol> lists, with a lot of CSS to make them display as a
horizontal block of links (as an example)...

so, no, HTML doesn't offer much in the way of maco-level semantics,
but on the micro level, elements like <ol>, <p>, <q>, <em>, etc.,
offer a lot of value...

XHTML 2.0 has a new element for just this sort of thing, although the
browser support may be, well, lacking (after all, it just came out
last week, and we can't expect browsers to support new elements from
specs not yet released)...


Read the evolt.org case study
Usability: The Site Speaks for Itself
ISBN: 1904151035

More information about the thelist mailing list