Do you have a question? Post it now! No Registration Necessary. Now with pictures!
March 19, 2005, 8:09 am
rate this thread
A generic block element.
No. Using Div elements (when a block is needed but HTML provides no element
with suitable semantic) has replaced *abusing* tables as layout tools (at
least among people who follow the standard).
No, but Div elements are more commonly used by people using CSS.
David Dorward <http://blog.dorward.me.uk/ <http://dorward.me.uk/
Home is where the ~/.bashrc is
I want to make clear that Iím not saying you should never use tables.
Tables are in HTML, and when you want to display tabular data, you
should use them. But for layout, there are other options.
Tables are slow
Tables can be inflexible
Accessibility issues are easier with CSS
Tables donít degrade
Tables donít print as well
Do not let the term "tableless layouts" fool you, it means exactly what
it says, it does not mean "tableless webpages". You should continue to
use tables for tabular data.
The <div> tag defines a division/section in a document.
7.5.4 Grouping elements: the DIV and SPAN elements
The DIV and SPAN elements, in conjunction with the id and class
attributes, offer a generic mechanism for adding structure to documents.
These elements define content to be inline (SPAN) or block-level (DIV)
but impose no other presentational idioms on the content. Thus, authors
may use these elements in conjunction with style sheets, the lang
attribute, etc., to tailor HTML to their own needs and tastes.
Yet another reason to be very suspicious about w3schools material.
That's better, and makes it clear that the <div> tag does not define a
division/section in a document. (The <div> _tag_ is just a start tag
for an element. And the element is a semantically empty block element.
It might be used to divide a document into sections, but it could be
used for any grouping of elements and text into a syntactic block. It
might even cross logical division/section boundaries.)
Yucca, http://www.cs.tut.fi/~jkorpela /
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
- » A new Free Resource Forum for Designers, Programmers & Web developers
- — Next thread in » HTML Markup Language
- » Content-type: multipart/form-data - how is boundary computed
- — Previous thread in » HTML Markup Language