HTML Tables
HTML tables are used to display data in rows and columns on a web page.
Tables can be used to organize and present data in a clear and easy-to-read format.
HTML tables are used to display data in rows and columns on a web page.
Tables can be used to organize and present data in a clear and easy-to-read format.
Here is an example of how to create a simple table in HTML:
<table>
<tr>
<th>Column 1</th>
<th>Column 2</th>
</tr>
<tr>
<td>Row 1, Column 1</td>
<td>Row 1, Column 2</td>
</tr>
<tr>
<td>Row 2, Column 1</td>
<td>Row 2, Column 2</td>
</tr>
</table>
HTML tables can be formatted using CSS to change the font, color, and alignment of the table and its contents. Here is an example of how to format a table using CSS:
table {
border-collapse: collapse;
width: 100%;
}
th, td {
border: 1px solid #ddd;
padding: 8px;
text-align: left;
}
tr {
background-color: #0891b2;
color: #ffffff;
}