How to Make a Table With HTML
Post By :
Anonymous
Rate:
Vote
How to Make a Table With HTML
Introduction
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
Steps
1
Step One
Begin with the tag < table >.
2
Step Two
Next, use < tr > to open a row.
3
Step Three
Within < tr >, use < td > to open a column.
4
Step Four
Enter the text in the first column. Then use < /td > to end your column and go on to the next one.
5
Step Five
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 >.
6
Step Six
If you want a second row, use < tr > to open your row and follow the same tag instructions from above.
7
Step Seven
When your table is done, use < /table > to close it.
8
Step Eight
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.
9
Step Nine
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.
Relative Topics
- How to Use Proper Table Etiquette
- How to Learn Table Manners
- How to Properly Serve a Table
- How to Set a Table Correctly
- How to Personalize a Restaurant Table Place Setting [VIDEO]
- How to Set the Table
- How to Set an Informal Table
- How to Create a fun table for dinner guests
- How to Set a Dining Room Table
Recommended Websites