Horje
HTML Tables

HTML tables allow web developers to arrange data into rows and columns.


Example of HTML Table

HTML Table works as a display your content and information. It is Started with <table> and end with </table>
index.html
Example: HTML
<!DOCTYPE html>
<html>
<head>
<style>
table {
  font-family: arial, sans-serif;
  border-collapse: collapse;
  width: 100%;
}

td, th {
  border: 1px solid #dddddd;
  text-align: left;
  padding: 8px;
}

tr:nth-child(even) {
  background-color: #dddddd;
}
</style>
</head>
<body>

<h2>HTML Table</h2>

<table>
  <tr>
    <th>Company</th>
    <th>Contact</th>
    <th>Country</th>
  </tr>
  <tr>
    <td>Alfreds Futterkiste</td>
    <td>Maria Anders</td>
    <td>Germany</td>
  </tr>
 
</table>

</body>
</html>

Output should be:

Example of HTML Table





Category:
Web Tutorial
Sub Category:
HTML Tables
Uploaded by:
Admin


Read Article
https://horje.com/learn/1434/reference