Re: Question re. div element

> The HTML specs (section 7.5.4) state that
> "The DIV and SPAN elements, in conjunction with the id and class attributes,
> offer a generic mechanism for adding structure to documents." [1]
> 
> I note that style can be added to  div so that one can be distinguished
> visually from  another div.
> 
> Question:
> The use of div does not really convey any structure to a screen reader user.
> Screen reading software do not identify div in the way  they are able to
> identify other structural elements like paragraphs, table, list, headings and
> so on.
> So is this a failing of screen readers or am I missing something here?
> Thanks,
> Sailesh
> [1]  http://www.w3.org/TR/html401/struct/global.html#h-7.5.4

div and span should be used if you want to do something that isn't directly
supported in HTML. They are semanticly very weak. More a failure of div and
span than of screen readers. This isn't to say you shouldn't use div or span,
but that you shouldn't use them (most likely in combination with CSS) as the
sole indicator of an important distinction.

-- 
Jon Hanna
<http://www.hackcraft.net/>
…it has been truly said that hackers have even more words for
equipment failures than Yiddish has for obnoxious people." - jargon.txt

Received on Thursday, 29 July 2004 12:58:00 UTC