SmartGirl
Newsletter Resources Search Site Map Contact
Speak Out Express Yourself Spread the Word Issues
Bookmark and Share
Home > Express Yourself > HTML Tutorial > 6. Fancy layouts
    HTML Tutorial  
   

Steps
  1. Overview
  2. About the Internet
  3. Hello, HTML
  4. Make it pretty
  5. Adding pictures
  6. Fancy layouts
    1. Looking at the pieces
    2. Customizing your table
    3. Insert a picture
  7. Show it to the world
Step 6. Fancy layouts

Customizing your table

There are many attributes for the <table>, <tr>, and <td> tags. One of them is for setting the width of the border around the table. This is measured in pixels, so the skinniest possible border is 1 pixel wide:

<table border="1">

If you use that piece of code, your tables will have a thin box around each of its cells. To be honest, we're not sure what the largest possible size is. Try out different sizes for the border attribute in the Playground and let us know if you find the answer!

You can also change how the text is positioned within a table cell by changing the <td> tag's attribute, valign. Change one of your <td>'s to:

<td valign="bottom">

It should change the vertical position of the text to be in the bottom of the cell. Other options for valign are "top" and "middle".

Adding align="right" to your <td> tags will make the text line up along the right edge of the box. Try changing another one of your <td>'s to:

<td align="right">

Other options for align are "left" and "center".

 
Previous Next


HTML Playground
Your Code


The Results

 
   
    SecretBuilders Crush Barometer Fortune Teller Smart Scope Dream Dictionary Mash Quiz