Horje

How to add collapsed borders to a table (with CSS) on HTML <table> Tag

Table with Collapsed Borders.

index.html
Example: HTML
 <html>
<head>
<style>
table, th, td {
  border: 1px solid black;
  border-collapse: collapse;
}
</style>
</head>
<body>

<table>
  <tr>
    <th>Month</th>
    <th>Savings</th>
  </tr>
  <tr>
    <td>January</td>
    <td>$100</td>
  </tr>
  <tr>
    <td>February</td>
    <td>$80</td>
  </tr>
</table>

</body>
</html> 

Output should be:

How to add collapsed borders to a table (with CSS) on HTML <table> Tag




Type:
html
Category:
Web Tutorial
Sub Category:
HTML Tag
Uploaded by:
Admin