logo
g Text Version
Auto
Beauty & Self
Books & Music
Career
Computers
Education
Family
Food & Wine
Health & Fitness
Hobbies & Crafts
Home & Garden
Money
News & Politics
Relationships
Religion & Spirituality
Society & Culture
Sports
Travel & Leisure
TV & Movies

dailyclick
Bored? Games!
Postcards
Astrology
Take a Quiz
Rate My Photo

new
English Garden
Costuming
Charity
Women's Fashion
Pop Music


dailyclick
All times in EST

Low Carb: 8:00 PM

Full Schedule
g
g HTML Site
Elizabeth Connick
BellaOnline's HTML Editor

g

The HTML Table - 2
Guest Author - Diane Cipollo

Attributes for the table tag:

<table border="1" bordercolor="#00c000" cellpadding="10"
width="100"> </table>
borderWith the border attribute you can set the thickness of the border/walls for the table. You specify the size by setting the value of the border attribute in pixels or percentage. If you don't want a border to be visible on the webpage you would then set the value to zero.
(border="0")
bordercolorThe bordercolor attribute sets the color for the border of the table. You specify the color by setting the value of the bordercolor attribute to a hexadecimal color code. You can also use color names such as red, blue, and yellow but this is being phased out. Note that some older browsers, especially Netscape browsers, will use the default gray border color.
cellpadding You will use the cellpadding attribute to force a space between the walls of the table cell (box) and the contents within the box.
widthThe width attribute controls the width of the table in pixels or percentage. For example, you can have a table 100 pixels wide (width="100") or 30% of the width of the webpage (width="30%").
Note--The arrow indicates that the code is wrapped to a second line and should really be all on one line.



Attribute for the tr (table row) tag.

<tr bgcolor="#c00000"></tr>
bgcolorYou will use the bgcolor attribute to control the color of the background for each row. You should use the hexadecimal color codes, the color names are being phased out. If you have more than one row in your table, each individual row can be given a different value for this attribute.


Attributes for the td (table data or table cell) tag

<td bgcolor="#000000" align="left" valign="top"
background="image.gif" width="25%" height="200"></td>
bgcolorYou will use the bgcolor attribute to control the color of the background for each cell. You should use the hexadecimal color codes, the color names are being phased out. Each individual cell can be given a different value for this attribute.
alignThe align attribute controls the horizontal alignment of the contents within each cell. You can force the contents to be aligned to the left side, right side, or centered. Each individual cell can be given a different value for this attribute.
valign The valign attribute controls the vertical alignment of the contents in a cell. (top, middle, bottom) Each individual cell can be given a different value for this attribute.
backgroundThe background attribute controls what image is to be placed as the background of a cell. This is not the same as being placed as contents within a cell. This image will be behind the contents within the cell. The value for this attribute is the url for the image. Each individual cell can be given a different value for this attribute.
widthThe width attribute controls the width of the cell in pixels or percentage. For example, you can have a cell 100 pixels wide (width="100") or 30% of the width of the table (width="30%").
heightThe height attribute controls the height of the cell in pixels.
Note--The arrow indicates that the code is wrapped to a second line and should really be all on one line.

← Back | Next →

|



RSS | Previous Features | Site Map


Content copyright © 2008 by Diane Cipollo. All rights reserved.
This content was written by Diane Cipollo. If you wish to use this content in any manner, you need written permission. Contact Elizabeth Connick for details.

Digg! g delicious Save to Del.icio.us

g


For FREE email updates, subscribe to the HTML Newsletter


Past Issues


print
Printer Friendly
bookmark
Bookmark
tell friend
Tell a Friend
forum
Forum
email
Email Editor

g features
How to Add Special Characters to Your Website

Getting Paid for Ads on Your Site

How to Post a Caption for Your Images

Archives | Site Map

forum
Forum
email
Contact

Past Issues
memberscenter


vote
Driving Amount
Much more
Slightly more
Slightly less
Much less

g


| About BellaOnline | Privacy Policy | Advertising | Become an Editor |
Website copyright © 2008 Minerva WebWorks LLC. All rights reserved.


BellaOnline Editor