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

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

new
European Travel
Action Movies
Bible Basics
Houseplants
Romance Movies
Creativity
Family Travel


dailyclick
All times in EST

Clairvoyance: 08:00 PM

Full Schedule
g
g HTML Site

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 →

|


This site needs an editor - click to learn more!

Add The+HTML+Table+%2D+2 to Twitter Add The+HTML+Table+%2D+2 to Facebook Add The+HTML+Table+%2D+2 to MySpace Add The+HTML+Table+%2D+2 to Del.icio.us Digg The+HTML+Table+%2D+2 Add The+HTML+Table+%2D+2 to Yahoo My Web Add The+HTML+Table+%2D+2 to Google Bookmarks Add The+HTML+Table+%2D+2 to Stumbleupon Add The+HTML+Table+%2D+2 to Reddit




RSS | Editor's Picks Articles | Top Ten Articles | Previous Features | Site Map


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


Content copyright © 2014 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 BellaOnline Administration for details.

g


g features
What's Coming in HTML 5

What is FTP?

HTML Fundamentals - Tables

Archives | Site Map

forum
Forum
email
Contact

Past Issues
memberscenter


vote
Poetry
Daily
Weekly
Monthly
Less than Monthly



BellaOnline on Facebook
g


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


BellaOnline Editor