post your comment   print   send to a friend
Rate:   0% | Views:  94
Question categories:  Web Design

LESSON 7

More Tables
To change the size and color of your table, you can specify border size and color and add space between the table cells.

WIDTH

BGCOLOR

CELLPADDING

CELLSPACING

BORDER

Laying It Out

<TABLE WIDTH=33%>

Use the WIDTH attribute inside the table tag to specify how much of the screen you would like your table to span. You can use a percentage, or you can use pixels for the value.

<TABLE BGCOLOR=yellow>

BGCOLOR in a table works just like the BGCOLOR attribute in a body tag. Use the color's name or its Hexadecimal code.

I Need My Space!
CELLPADDING and CELLSPACING will let a little air into your table and make it easier to view.

<TABLE CELLPADDING=5 CELLSPACING=5>

CELLSPACING is the amount of space you want between your table cells. In the example above, we specified that we want five pixels of space between our cells.

CELLPADDING is how many pixels of space you want on the inside of your cell between your text and the border.

Here is a table with cellspacing and cellpadding:

Notice how there's plenty of space between the individual cells

Also notice that the text inside of the cells doesn't touch the border

Now here is the exact same table without cellspacing or cellpadding:

The cells in this table have absolutely no space between them

And the text runs right up against the border

Speaking Of Borders
You can control the thickness of your table border by using the BORDER attribute.

<TABLE BORDER=4>

You can even lose the border altogether by indicating a value of 0 for the BORDER attribute.

Customer Feedback
Rate:   0% | Views:  94 | Please Rate:  
 
If you have other comments or ideas for future technical tips, please type them here:

Email: (optional)

Comments: (optional)

 Domain Name Registration | Register Domain    Back to serch results
Browse the Base
Knowledge Base
Web Design
  Trellix SiteBuilder
  FrontPage
  Professional Design
  Do It Yourself
  WSC Website Builder
Messages
 

$75 Free Google AdWords

Free $75 Google AdWords when you sign up for WebImage! Target by location, create your own, or let Google create your ads for you. Check out http://www.aplus.net/google.html to see how AdWords works for you.

Private Area
 
Ask
in Private
   
Personal
Folder
 
Related Questions
 
1. What exactly is HTML?
 
2. What about Hypertext Markup Language?
 
3. What is Body Tag?
 
4. How to place Headings on your page and how to use the Font Tags?
 
5. What is a HYPERLINK?
 
Home Browse Search Ask in Private Personal Folder   Help
powered by web hosting 
  Logged as: Guest