HTML Basics

Tables

1. How do I align the table itself?

Use these tags:

left aligned table

<.TABLE BORDER ALIGN="left">

right aligned table

<.TABLE BORDER ALIGN="right">

centered table

<.CENTER><.TABLE BORDER> <./table><./CENTER>

 

***Note: We've added a period to HTML tags between the < and tag for display purposes. Do not use the period in your html documents. Eg. use <tag> and not <.tag>

 

2. How do I align inside of my tables?

Vertical Alignment of Cell Content

top aligned cell content tag:

<.TABLE BORDER>

<.TR>

<.TD VALIGN="top">top aligned cell content<./TD>

<./TR>

<./TABLE>

<.TABLE BORDER>

<.TR VALIGN="top">

<.TD>top aligned cell content<./TD>

<./TR>

<./TABLE>

middle aligned cell content tag:

<.TABLE BORDER>

<.TR>

<.TD VALIGN="middle">middle aligned cell content<./TD>

<./TR>

<./TABLE>

<.TABLE BORDER>

<.TR VALIGN="middle">

<.TD>middle aligned cell content<./TD>

<./TR>

<./TABLE>

bottom aligned cell content tag:

<.TABLE BORDER>

<.TR>

<.TD VALIGN="bottom">bottom aligned cell content<./TD>

<./TR>

<./TABLE>

<.TABLE BORDER>

<.TR VALIGN="bottom">

<.TD>bottom aligned cell content<./TD>

<./TR>

<./TABLE>

 

***Note: We've added a period to HTML tags between the < and tag for display purposes. Do not use the period in your html documents. Eg. use <tag> and not <.tag>

 

3. Can I add color inside my tables?

If a row color is specified, it overrides the background color setting for the complete table, a cell color background overrides a row and table background setting.

To make your table background color black, place the following into the table border statement after the size of the table border: BGCOLOR="#000000"

 

4. How do I add a image inside my table?

Use this tag:

<.TABLE BORDER>

<.TR>

<.TD VALIGN="middle"><.IMG SRC="picture.gif" ALT="picture"><./TD>

<./TR>

<./TABLE>

***Note: We've added a period to HTML tags between the < and tag for display purposes. Do not use the period in your html documents. Eg. use <tag> and not <.tag>

 

5. How do I link an image inside my tables?

Use this tag:

<.TABLE BORDER>

<.TR>

<.TD VALIGN="middle"><.a href="url"><.img src="picturenamehere.gif" border="0"><./a><./TD>

<./TR>

<./TABLE>

***Note: We've added a period to HTML tags between the < and tag for display purposes. Do not use the period in your html documents. Eg. use <tag> and not <.tag>

 

6. How do I make a table or a table cell stay at a certain width?

Use <.TABLE WIDTH="n"><./TABLE> for a specific width of the complete table and <.TD WIDTH="n"><./TD> for a certain width of the table cell. "n" can have a value in pixels or in % of the visible browser window.

***Note: We've added a period to HTML tags between the < and tag for display purposes. Do not use the period in your html documents. Eg. use <tag> and not <.tag>

7. How do I make a table or a table cell stay a certain length?

Use <.TABLE LENGTH="n"><./TABLE> for a specific length of the complete table and <.TD LENGTH="n"><./TD> for a certain length of the table cell. "n" can have a value in pixels or in % of the visible browser window.

***Note: We've added a period to HTML tags between the < and tag for display purposes. Do not use the period in your html documents. Eg. use <tag> and not <.tag>

Top of page