Re: My thoughts on XHTML 2

kelvSYC wrote on Wednesday, January 22, 2003 at 10:16:55 AM:

>>> 6. The difference between <section> and <div> should be made more
>>> clear. I have a hard time determining the difference, and I fear
>>> that people may not care about the difference, seeing that <div>
>>> elements currently do what <section> would do anyways.
>> 
>> I suggest
>>  section { margin-left: 2em; }
>> for UA's default rendering.
>> (Of course, language direction would need to be taken into
>> account.)
>
> ... And what would something like that do to distinguish the
> difference in semantics (obviously, since there are different tags
> in the first place, whoever made them thought there was some
> semantic difference)?

The div element has no real semantic meaning (it adds "generic
structure"). In the past, div elements have been used to delineate
sections of text in HTML because there was no better element for it
(this is one example of div's usage, to fill in where there is no
appropriate block-level element). The section element, especially
combined with h elements, is the more appropriate replacement. It has
a specific meaning (a section of a document) whereas the other has no
specific meaning. The div element will continue its role, which is
primarily to add value to authors with classes (to be styled with
style sheets), specify language changes, etc. If there was no generic
block-level element (div) and inline element (span), an author would
need to either leave markup out, use an incorrect element, etc.

-- 
John

Received on Wednesday, 22 January 2003 23:04:30 UTC