How to use html tables

HTML Tables

CLICK HERE To Learn Beginner Web Design - Instant Access >>


A Little HTML for Beginners Helps You Use Tables

Designing a professional looking web site involves much more than simply displaying text between your body tags. In order to organize your page, you must use tables. A table is an HTML element, also referred to as a "tag," and is used to display your web page content in an organized fashion.

 

Your page can be set up in columns and rows, you can display your table cells with or without a border, and you can even have a color or image patterned background. Tables can be used in an unlimited number of ways including:

  • Organize your text and images
  • Display your text in a newspaper format
  • Add color and image backgrounds to text areas
  • Display charts

 

If you've never designed a web page, your first step will be to learn some basic HTML. You can find a beginner tutorial at NCSA Beginner's Guide to HTML:

www.ncsa.uiuc.edu/General/Internet/WWW/HTMLPrimer.html

 

When you begin designing your web page, you may want to consider placing all of your page content within a table. This will enable you to adjust your table's cellspacing to keep your text from displaying too close to the left border of your page. The higher the cellspacing value, the further away from the left border your text will be displayed. In addition, tables will enable you to display your page content in rows and columns rather than one big block of text.

 

How To Create Tables

Tables are created with the <TABLE></TABLE> tags. The <TABLE> tag begins the table code and the </TABLE> tag ends the table. In addition to the table tags, you must also specify the number of rows and columns your table will contain.

 

To do this, you must use the <TR> tag, which specifies the beginning of a table row and the <TD> tag, which will display your table data. The <TD> tag should be placed in front of any information you would like to be displayed within a cell. The </TD> tag will close the cell. All of these tags will be placed between the <TABLE> and </TABLE> tags.

 

Basic Table Structure:

<TABLE BORDER>

<TR>

<TD>Content</TD>

</TR>

</TABLE>

  

For Beginner Webmasters

If you're just starting out, you may want to use a simple table format that will display your navigational links on the left or right hand side of the page, and your text and other information on the rest of the page -- in two columns.

 

When working with tables, make sure you create your tables with a border. This will enable you to see exactly where your borders are so that you can make sure everything is displaying properly. Once your page is complete, you can remove the border.

 

The following table code will create the basic layout for a web page with two columns. The first column will span 20% of the viewers' screen. The second will span 80% -- for a total

of 100%.

 

<TABLE BORDER CELLSPACING="10" CELLPADDING="10" WIDTH="100%">

<TR VALIGN="Top">

<TD WIDTH="20%">&nbsp;</TD>

<TD WIDTH="80%">&nbsp;</TD>

</TR>

</TABLE>

 

Notice the table width is set to 100%? This width will display the table across 100% of the viewers' screen. The cellspacing and cellpadding are set to 10 so that the text won't display right up against the left edge of the page, and there will be some space between the cells.

 

Once you have the basic page layout finished, you can begin adding your content. Your first step will be to delete the placeholder &nbsp;. These placeholders were placed between the <TD> and </TD> tags to enable the borders to display -- empty table cells do not display within a web browser.

 

Your logo and navigational links should be displayed within the left column, which is the smaller of the two columns. All of your page content will be placed within the other column.

 

Keep in mind, the top left corner of your web page will not only be used to display your logo, but should also contain your most important keyword phrase. Make sure you include an image alt tag displaying your keyword phrase within your image code.

 

Use Color To Enhance Your Design

To spice up your page, you can create additional tables with color backgrounds and borders to divide your content into sections.

 

All of your text and additional tables will be placed between <TD WIDTH="80%">&nbsp;</TD>. Simply replace the &nbsp; text with your content and table codes.

 

For example, the following table can be used to display an introduction to your product, article, review or whatever you'd like.

 

Keep in mind, you don't want to place all of your information on your main page. The key is to include highlights of your site on your main page with a link to further information.

 

The example link at the bottom of the table can be used to direct your visitors to further information. You can use the colors of your choice and adjust the width to suit your needs.

 

<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="2" ALIGN="Center" WIDTH=80%>

<TR>

<TD BGCOLOR="#919C9C"><P ALIGN=Center>

<FONT face="Verdana,Helvetica" SIZE="2" COLOR="#FFFFFF"><B>Your Table Heading</B></FONT></TD>

</TR>

<TR>

<TD BGCOLOR="#000000" HEIGHT="2"></TD>

</TR>

<TR>

<TD BGCOLOR="#CCCCCC"><P ALIGN=Left>your text here</TD>

</TR>

<TR>

<TD BGCOLOR="#000000" HEIGHT="2"></TD>

</TR>

<TR>

<TD BGCOLOR="#919C9C"><P ALIGN=Center>

<FONT face="Verdana,Helvetica" SIZE="2"

COLOR="#FFFFFF"><B>Link to further

info</B></FONT></TD>

</TR>

</TABLE>

 

Keep in mind, when displaying text within each table cell, to specify a specific font, you must use a font tag within each table cell. Once you complete your web page, make sure you remove your table border. That's all there is to it.

 

If you're not confident in your ability to design a professional looking web site, Template Monster offers a large variety of highly professional site templates.

Template Monster

 

If you're in need of a professional logo, Gotlogos will design a beautiful logo for your site for only $25. http://www.gotlogos.com Take your time and test different table designs. Try adding new rows and columns and change the background and border colors. The more you practice, the better you will become.

Gook luck with your new site!

 

Web Design Course Picture CLICK HERE to Learn Beginner Web Design Online >>

 

 

 

 

 


Web design tutorial presented by Bob Pardue, owner of Webmaster Course and editor of Web Design Newsletter. Get free web design newsletter and bonus mini course ...
About the Author

Shelley Lowery is the author of the acclaimed beginner web design series, Web Design Mastery -- an in-depth guide to professional web design that is rapidly becoming known as the "Bible" for professional web design.


Related:


Beginner Web Design Class
Website Design Inspiration
Best Web Design Companies
Ecommerce Web Design
Small Business Web Design
Internet Web Design
Web Design Graphics


| About Us | Contact | Privacy Policy | Resources | FAQ | Site Map | Disclaimer |

© Copyright WebMasterCourse.com - All Rights Reserved. - Web How to insert html tables

Web Design Mastery Course for beginners

Important Pages for HTML Web Design Beginners


Web Design Course
HTML for Beginners
Web Design Tips and Free Bonus
Learn Web Design from Home For Beginners
Read this Web Design Course Review for Beginners
Webmastery Course Features
Web Design Tips for Beginners
Online Web Design Classes and Tips
FREE beginner web design tips delivered about twice weekly - get HTML designing advice, page structure and a free bonus 7 part mini-course when you join today!!


Internet Marketing


Internet Marketing Strategies

Web Hosting & Domains


Find and Register a Domain Name
Affordable Web Hosting Services

Blogging


Basics of Starting a Blog

Tweet Us!




Other Interesting Internet Sites


Freelance Writing Business
Adobe Dreamweaver Com
Web Design Org
Website Design Directory
Definition of ISP