Basic 1-Column Layout

Home  /  Tech Stuff  /  Basic 1-Column Layout

On January 6, 2009, Posted by , in Tech Stuff, tags , , with No Comments

Most websites have a similar structure consisting of a header, content, and footer. The header is located at the top of the page and contains the title of the site, along with perhaps a logo, tagline, and some other branding. The header is usually consistent from page to page.

The content is where the “meat and potatoes” of the page goes. The information here will change for each page. Often this section of the page is divided into two columns with one being primary content and the other being secondary content. Some sites will feature three columns and others just one. For the sake of simplicity, this example features only one column.

The footer is located at the bottom of the page and usually contains copyright information and a text version of the main menu. (Note: On a Mac, the copyright symbol © is typed by pressing option-g.) It may also include legal disclaimers, contact information, sitemaps, and credits. The footer, like the header, is usually consistent from page to page.

These sections are created with a <div> tag and given an id. Additionally, another div is “wrapped” around all of these sections to control the overall width and positioning of the page. To be consistent, I will always give this div and id of “wrapper”, but you may see it with other names such as “container”.

Here is an example of the HTML source of a basic 1-column, XHTML layout:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="" xml:lang="en" lang="en">
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
            Basic 1-Column Layout
        <div id="wrapper">
            <div id="header">
                    Page Header Here
            </div><!--END HEADER DIV -->
            <div id="content">
                    Content Goes Here
            </div><!--END CONTENT DIV -->
            <div id="footer">
                    Footer Goes Here
            </div><!--END FOOTER DIV -->

Leave a Reply

Your email address will not be published. Required fields are marked *