|
|
|
||
|
|
|
|
XHTML Div - Breaking up a Page Into DivisionsBreaking up a page into divisions allows you to mark regions of your document, then, in conjunction with Cascading Style Sheets (CSS) you can globally apply styles to an entire region of a page. CSS represents an easy way to restyle existing HTML markup, whereas restyling other types of media such as Adobe formats may require pdf conversion software. We'll cover more about CSS in our CSS tutorial section - for now, just remember that the XHTML div tag enables you to create more advanced layouts while making it easier to maintain pages by decoupling a page's content from its' layout. XHTML <div> ExampleHere's an example XHTML code fragment that shows a very typical use of the div tag, used to structure the various parts of a webpage:
Code Sample:
In the early days of the Web, page layout relied heavily on the use of HTML tables - thankfully, this outdated practice is no longer needed, however. The preceeding example shows a standard 3-column web page layout - notice how the XHTML div tags are used to demarcate different regions of the page - a left hand navigation bar, a center content column, and a right hand call-out area. Every enclosed <div> region is identified by either an id or a class, for example - id="pagecontents", class="leftnavigation", or class="centercolumn", etc. Using CSS - you could then precisely describe how the contents of that div-enclosed region should be formatted. XHTML Div TutorialTo break up a page into different divisions, follow these steps:
Tips and Tricks on How to use the XHTML Div Tag
|
|
||||||||||||||||||||||