What is HTML Table and how is it made?

 


What is HTML Table?

An HTML desk is a manner to prepare and show facts in a based grid format using the HTML language. It is created using the <table> element and its rows and cells are created using the <tr> (desk row) and <td> (table facts) factors respectively. Each mobile inside a row can contain text, photographs, or other HTML factors. The desk can also have headers, that are created using the <th> element.

HTML tables are commonly used to show tabular information, such as economic reports, sports activities information, or product lists. They can also be used for layout purposes, even though this is generally not advocated as it could make the code much less readable and tougher to maintain.

Tables may be styled with the usage of CSS to control the appearance, which includes font, shade, and background color. They can also be made responsive so that the format adjusts to distinct display sizes.

How to HTML Table?

An HTML desk has created the usage of the `<table>` detail. The rows of the desk are created using the `<tr>` detail, and the cells inside those rows have created the usage of the `<td>` detail. Here is an instance of a primary HTML desk:




You also can define desk headers the use of the `<th>` detail, which is generally used to label columns or rows.




In this example, the headers "Name", "Age", and "City" are defined using the `<th>` element, and provide a label for the data that follows in the rows of the table.
The `<td>` element is used to define the table data cells, that contains the actual data.
You can also use css to style the table, headers and data cells.


*Since this is a simple example, I did not share the codes, it would be more useful if you do it yourself.

*

Post a Comment (0)
Previous Post Next Post

Iklan Tengan Artikel 1