Pirative
Home Discovery Login

14 - Tables

May 14, 2047

Tables in HTML allow you to organize and present data in a structured manner.

The <table> tag is used to create a table, which consists of rows and columns. Each row is represented by the <tr> tag, and within each row, you define cells using the <td> tag.

To add headers to your table, you can use the <th> tag, which stands for table header. The <th> tag is similar to the <td> tag, but it is typically used for the first row or column to provide labels for the data.

You can also merge cells horizontally using the colspan attribute or vertically using the rowspan attribute to create more complex table layouts.

By using these simple table tags, you can easily display data in a well-organized and readable format on your web page.