DIV elements can be used to structure HTML documents as a hierarchy of divisions. The ALIGN attribute can be used to set the default horizontal alignment for elements within the content of the DIV element. Its value is restricted to LEFT, CENTER or RIGHT, and is defined in the same way as for the paragraph element .
Note that because DIV is a block-like element it will terminate an open P element. Other than this, user agents are not expected to render paragraph breaks before and after DIV elements. CENTER is directly equivalent to DIV with ALIGN=CENTER. Both DIV and CENTER require start and end tags.
Conclusions about DIV types:
(a) That they are primarily useful for navigation in a book and understanding of it, and only secondarily useful as a means of searching or of limiting searches. The main reason that they are not more useful for retrieval is the lack of control on the vocabulary used for TYPEs. If we could establish greater control, either ourselves or by use of an external controlled vocabulary, we could improve the reliability of TYPEs for retrieval. We've made some efforts on this, at least with regard to frequently recurrent features (imprimatur, letter, poem, tract, play, sermon, license, publisher's catalogue, errata, title page, half title, appendix, preface, to the reader, encomium, etc.)
(b) That the usefulness for navigation is to some extent potential rather than real because much of the information is suppressed in the current interface. But imagine an alternative interface. Imagine one, for example, in which HEADs are suppressed, but TYPEs and Ns are always displayed. We would like the book to be navigable and intelligible in that form of display as well.
So ignore the presence of headings, and the quirks of the current display, to a large extent in deciding how much detail to give in the TYPE and N.
(c) That the hierarchical ordering of the DIVs allows information about the parent to inform our understanding of the siblings. This means that if it is obvious from
the parent (and/or the N values) what the parts are, and there is no convenient name for the subordinate parts, one may take the subordinate div as relative to the
superordinate DIV.
Many people try to use table elements and its descendants for page layout, for two reasons. The first is historical: tables have been around longer than CSS. Second, tables offer a quick way to create a grid-based page layout. The prevalence of table-based layouts leads to the main gripe some have against CSS (aside from sketchy support in certain browsers): replacing table-based layout with pure CSS is often seen as a difficult task.
Advantages CSS can have over tables:
1. smaller page size, quicker to load
2. future flexibility
3. easier to read the source
4. search-engine-friendly.
Report (0) (0) |
12 years, 8 month(s) ago