There are five different alignment models in HTML, and not all parameters are supported in each model. CSS is more commonly used to align models, as it uses just the basic text-align (horizontal contained elements) and vertical-align.
This refers to the text surrounding the rectangle bearing the align attribute. The W3C only sanctions some of the various align attribute values.
The extended values where introduced to deal with the problem of ascenders and descenders on letters. Ascenders are the parts of a character that extend above the top line (e.g. L). Descenders are the parts of a character that extend below the base line (e.g. y). As such, the above attributes align to the top and base line.
This is perhaps the most obvious use of align, but center is prominent in its absence from the W3C supported values. This is more a case of moving alignment to CSS then doing it in the HTML.
By default block elements size to fit or expand through the containing box. A width has to be set, and the element contained in a full width block.
This works in much the same way as horizontal alignment of text in a contained box, except that justify is not honoured by some browsers. If you wish to use justify then wrap the text in a p tag.
Vertical alignment of text gets a special attribute; the valign attribute, the attribute values are top, middle and bottom.
It is probably best to use CSS alignment technique than to rely on the HTML align and valign attributes of elements. Most text browsers use sensible alignment defaults so very little is gained in using alignment in these instances, but this is perhaps the only time you really should consider aligning in HTML.
Bookmark and then activate Concept Visor to comment on this page, or any other page on the web. The Concept Visor also allows you to view comments made on the page.
If you have found this site useful please consider linking to it @ http://html.poisedsolutions.com/
© Copyright Poised Solutions 2008 All Rights Reserved
Site Designed & Developed by
Poised Solutions
If you wish to discuss hiring Poised Solutions for an
information technology (IT project please get in contact
or visit the main PoisedSolutions IT Consultancy Website.
Poised Solutions is based in the Thames Valley area of the UK.