SmartGirl
Newsletter Resources Search Site Map Contact
Speak Out Express Yourself Spread the Word Issues
    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

Looking at the pieces

To create a table, put a <table> tag in the <body> section. This tells the browser that you are going to put a table in your web page. The next step is to start specifying what's going to go in the first row. Each row in a table starts with the <tr> tag. The "tr" in the tag stands for table row. Each cell in the table is started with a <td> tag ("td" stands for table data) and ends with a </td> tag. The end of a row is marked by a </tr> and the end of a table with </table>. That's a little confusing, so the graphic below may help you better understand how the code should be written and what the results will look like. (Note that we included the border lines on the left just to make it easier to read.)

HTML code for a table    How the browser will display the HTML table

To put in another row, add an additional set of <tr></tr> tags with the same number of <td></td> tags as the other rows in the table. To add another column, each table row needs another <td></td> tag. Try adding another column to the table in the HTML Playground.

 
Previous   Next


HTML Playground
Your Code


The Results

 
   
    Crush Barometer Fortune Teller Smart Scope Dream Dictionary Mash Quiz