How to Make a Table With HTML

By eHow Computers Editor

Rate: (4 Ratings)

Tables can let you view an array of data in HTML. The table tags are designed to make groups of information look better and to allow users to get borders around lists. A table in HTML is created by using several tags in the right order.

Instructions

Difficulty: Moderate

Step1
Begin with the tag < table >.
Step2
Next, use < tr > to open a row.
Step3
Within < tr >, use < td > to open a column.
Step4
Enter the text in the first column. Then use < /td > to end your column and go on to the next one.
Step5
Use < td > to open your second column and enter the text. Then use < /td > and < /tr > to end your column and your row. At this point, if you have a row with two columns containing the text "June" and "July", your code will look like this: < table > < tr > < td > June < /td> < td > July < /td > < /tr >.
Step6
If you want a second row, use < tr > to open your row and follow the same tag instructions from above.
Step7
When your table is done, use < /table > to close it.
Step8
Within the table structure, tags are placed to create a border. The thickness of the border is indicated by a variable x as follows: < table border = x >. Put this just after the < table > command.
Step9
Cellpadding is how many pixels are between table text and the border. Put this command after the border command: < cellpadding = x >.

Tips & Warnings

  • Don't include more columns on the second row than you added on the first. Asymmetrical tables can cause problems.
  • When making tables, also consider the style tags such as border, cell space and others that determine what the table border will look like. These usually take values related to number of pixels. Guides are available online.
  • Due to formatting demands, the code used here has spaces between the command text and the brackets < and >. Your code should not have space in between a bracket and the next character.

Post a Comment

POST A COMMENT

Request a New How-To Article

Looking for more How To information? Chances are there’s an eHow member who knows how to do what you’re looking to do. Submit an article request now!

eHow Article:  How to Make a Table With HTML

eHow Computers Editor

eHow Computers Editor

Category: Computers

Articles: See my other articles

Related Ads