- Computer Using
- Windows
- Browser
- How-To
- Microsoft Office
- MS Word
- MS Excel
- MS Outlook
- MS PowerPoint
- Graphic / Design
- Photoshop
- Illustrator
- Server & Network
- Computer Networking
- Internet
- Windows Server
- Web Development
- HTML
- Javascript
- CSS
- ASP.NET
- PHP
- Animation
- Flash
- Silverlight
- Database
- Database System
- SQL Server
- T-SQL
- XML
- XML
Creating Table
With HTML you can create tables.
Tables are defined with the <table> tag. A table is divided into rows (with the <tr> tag), tr stands for "table row", and each row is divided into data cells (with the <td> tag). The letters td stands for "table data," which is the content of a data cell. A data cell can contain text, images, lists, paragraphs, forms, horizontal rules, tables, etc
Write HTML Code
1. <html> 2. <head> 3. <title>How to use tag Table</title> 4. </head> 5. <body> 6. <h1>This is my Table</h1> 7. <table border="3" cellpadding="2" cellspacing="3"> 8. <tr> 9. <td>Column 1</td> 10. <td>Column 2</td> 11. <td>Column 3</td> 12. <td>Column 4</td> 13. </tr> 14. <tr> 15. <td>Column 5</td> 16. <td>Column 6</td> 17. <td>Column 7</td> 18. <td>Column 8</td> 19. </tr> 20. </table> 21. </body> 22. </html>
Explain
Line 7.<table> use to open table tag.
border attribute use to set border for table
cellspacing attribute use to set space between column and column
cellpadding attribute use to set space between column with text in column
Line 8.<tr> use to create new row in table
Line 9.<td>Column 1</td> use to create column in row with text Column 1. And </td> use to close Column
Line 10.<td>Column 2</td> use to create column in row with text Column 2. And </td> use to close Column
Line 11.<td>Column 3</td> use to create column in row with text Column 3. And </td> use to close Column
Line 12.<td>Column 4</td> use to create column in row with text Column 4. And </td> use to close Column
Line 13.</tr> use to close tage row in table
Line 20.</table> use to close tage table
Result
This is my Table
| Column 1 | Column 2 | Column 3 | Column 4 |
| Column 5 | Column 6 | Column 7 | Column 8 |

