HTML Table

              HTML Table

An HTML table is a way to display data in a tabular format using rows and columns. The table is defined using the <table> tag, and the rows are defined using the <tr> tag. The cells of the table are defined using the <td> tag (for data cells) and <th> tag (for header cells).

Here is an example of a simple HTML table:

<table> <tr> <th>Header 1</th> <th>Header 2</th> </tr> <tr> <td>Data 1</td> <td>Data 2</td> </tr> <tr> <td>Data 3</td> <td>Data 4</td> </tr> </table>

This will create a table with two columns and three rows. The first row will be used as a header row and will contain the text "Header 1" and "Header 2". The next two rows will contain the text "Data 1", "Data 2", "Data 3" and "Data 4" respectively.

You can also use CSS styles to format the table, such as setting the width and height of the table, changing the font and background color, and adding borders and padding. Additionally, you can also use HTML attributes such as align, valign, and colspan to control the alignment and layout of the table cells.

It's worth noting that there are other tags and attributes that can be used to create tables and also you can use javascript and jquery libraries to create dynamic tables and handle events such as sorting, filtering, pagination and more.



Comments

Popular posts from this blog

What is Computer ?

Generation of Computers

Z-WAVE