Web Design Stuff
HTML Tutorials    CSS Tutorials    Web Hosting   Resources
Create a Web Page 101
Making Web Pages Intro What is a Web Page? Why Make a Web Page? The History of HTML Learn HTML or XHTML?
Basic HTML
Basic HTML Tutorials Basic HTML Necessities How to Make a Web Page How to Edit a Web Page The Basics of HTML Tags Basic HTML Page Structure HTML Attributes
HTML Font Codes
HTML Font Codes Intro HTML Font Color Codes HTML Font Size Codes HTML Font Style Codes HTML Bold/Italic Codes Combining Font Codes
Formatting Text
Formatting Text Intro Making Paragraphs Miscellaneous Formatting Headings & Subheadings Creating Hyperlinks
Using Graphics
Using Graphics on the Web Add Graphics to Your Pages Graphics and Accessibility How to Align Graphics Page Color & Background Graphics as Hyperlinks Horizontal Rules
Creating Tables
HTML Tables Tutorials HTML Table Fundamentals Background & Border Color Table Frames & Rules Table Width and Alignment Cells 1 -Space & Alignment Cells 2 -Row Column Span Cells 3 -Width & Height
Making Lists
HTML Lists Tutorials Bulleted Lists Numbered Lists Definition Lists
HTML Frames
HTML Frames Tutorials Using Frames for Layout Advanced Frame Layouts Putting Hyperlinks in Frames Frame Border Width Color, Margin and Control Problems with Frames SmartFrames: A Solution SSI: An Alternative to Frames
Web Page Forms
Making Feedback Forms A Simple Feedback Form Installing NMS FormMail Debugging Your Setup My Web Host is Out to Lunch User Input Components Text Fields Checkboxes & Radio Buttons Dropdown Menus Push Buttons Layout and Presentation
Basic CSS
Basic CSS Tutorials What is CSS? Why You Should Use CSS How to Use CSS Inline Styles Embedded Style Sheets External Style Sheets Class Selectors ID Selectors Combining Selectors
CSS Properties
CSS Properties Intro Font Styles Width, Height & Spacing Borders Backgrounds Position Float & Alignment Hyperlinks
All About Web Hosting
Hosting Your Own Website What is a Web Host? Your Website's Home Page Building a Website Offline About Free Web Hosting Best Free Web Hosting Commercial Web Hosting How to Get a Domain Name Ecommerce Web Hosting Web Hosting Terminology
Free Web Design Tools
Best Free Website Tools Best Free Text Editors Best Free Graphics Editors Free Website Analysis Tools
Setting Up HTML Kit
HTML Kit Introduction How to install HTML Kit Screenshot Breakdown Basic Configuration Overall Appearance Shortcuts and Startup Editing Window Customizing Toolbars Using the Favorites Tab Making a New Actions Bar Odds and Ends
Free Templates
Free Website Templates Two Column Fixed Width Three Column Liquid Layout Miscellaneous Templates Dynamic Menu Effects Two Column Experimental Terms of Use About These Templates
Website Templates Help
Getting Started Template Zip File Download How to Edit Your Template What to Edit in the HTML How to Add Your Logo Making a Website
Web Design Tips
Web Design Basics Tables vs. Tableless Using Tables for Layout Example Table Layouts World's Crappiest Web Page
Twitter Backgrounds
Twitter Backgrounds Intro Cool Twitter Backgrounds Cool Twitter Backgrounds 2 Plain Twitter Backgrounds Dark Twitter Backgrounds Best Twitter Backgrounds Cute Twitter Backgrounds Music Twitter Backgrounds Music Twitter Backgrounds 2 Twitter Backgrounds 101 TERMS OF USE
All About Web Browsers
What is a Web Browser? Mozilla Firefox Internet Explorer Opera How to Set Up Firefox Top 5 Firefox Extensions
 
Contact
Post Some Feedback Send Me An Email Iron Spider Blog About Iron Spider... Site Conventions
 
 
 

 

Using Tables for Layout

 
When I first got on the internet several years back, I would frequently admire the layout of the big corporate media websites and wonder, "How do they do that?" So then I peeked at their source code and found a virtual morass of HTML tables as far as the eye could see. Then I discovered that they were not only using tables but they were also using tables nested inside more tables nested inside still more tables. So then the big question that hit me was "WHY?" Following this I spent innumerable hours plowing through and dissecting these layouts trying to find out what they knew that I didn't.

I have since discovered all the methods behind the madness and I am now writing this tutorial on using HTML tables to layout web pages largely in remembrance of having to learn all this the hard way.

Good Web Design Basics


The basic idea behind good web design is to partition your web page into various sections and columns to give it a professional allure and to make it more user friendly. This technique is also conducive to:
  • Creating a template that you can use on all your web pages to render a familiar look every time a visitor goes to a different part of your site. A website should be like your home in that you want visitors to feel welcome and at ease throughout their stay. You don't want them completely disoriented and wondering where the heck they are the minute they decide move around, i.e. move to another page on your site.
  • Creating a header section that runs across the top of your page in order to designate a prominent place for your website logo, slogan, cool graphic or whatever. The top of your web page is prime real estate in web design terms and is the part of the page that will have the greatest impact on your visitors. You want to make sure that you use this space wisely.
  • Creating multiple columns that clearly divide your web page into various logical sections such as:

    • A menu column containing a list of links to other pages on your website. This will help your visitors get around regardless of what page they are on.
    • A main content column (such as that which holds the text you are currently reading). This column renders the main text and graphics which define what your web page is about. This should be kept narrow enough to facilitate easy reading. A computer screen is typically much wider than a page in a book or a column in a newspaper or magazine. Lots of text spanning across the entire screen quickly becomes tiresome to read and comprehend.
  • Creating a footer section to hold copyright information and important links. This helps to create a visual ending to your web page and can help direct visitors to other important sections of your website.

Fundamentals


The easiest way to divide your web page into subsections is to start by rendering it as one big table that spans the entire width and at least the entire height (or more) of the web browser viewport. You can do this by inserting a table in between the <body>...</body> tags of your HTML document and then using the following code in the <table> start tag:
<table width="100%" style="height: 100%;">
Then everything on your web page goes inside this table. A distinct advantage of using this technique is your table design will automatically expand to the full height of the web browser viewport should your page fail to have enough content in any of the columns to accomplish this on its own.

You can then define table rows <tr>...</tr> and table cells <td>...</td> to create the rows and columns of your layout. If you want one table row to contain a single cell which spans the full page width then you can just use the colspan attribute.

To eliminate the default padding and margin that most browsers apply to the document body, you can put the following code in your <body> start tag:
<body style="margin: 0px; padding: 0px;">

All of this will be alot easier to visualize if we use some actual examples of table layouts along with the associated HTML source code to act as a study aid. This will be covered next...





Web Hosting 101

Learn about web hosting without the technobabble!

What is Web Hosting?
Best Free Web Hosting
Affordable Domain Names
Affordable Web Hosting

See also:

How to Make a Web Page
Free Website Templates

 

If you need a .COM web address, you can get one quick and easy at...

www.GoDaddy.com
<~ BACK TOP NEXT ~>
 
HTML Tutorials |  CSS Tutorials |  Web Hosting |  Domain Names |  Web Design Resources
Iron Spider © Copyright 2004-2011 Robert Darrell