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>
Example of HTML Table | HTML Tables |
HTML Tables | HTML Tables |
How to create an HTML Table | HTML Tables |
How to create HTML Table Cells | HTML Tables |
How to create HTML Table Rows | HTML Tables |
How to create HTML Table Headers | HTML Tables |
Type
: |
html |
Category
: |
Web Tutorial |
Sub Category
: |
HTML Tables |
Uploaded by
: |
Admin |