CSS Table

Table layout can be used to represent tabular relationships between data.

<!DOCTYPE html>
<html lang=“en”>
<head>
<meta charset=“utf-8”>
<style type=“text/css”>
table, td, th {
border: 1px solid #eee;
text-align: center;
}

table {
border-collapse: collapse;
width: 50%;
margin:0 auto;
}

th, td {
padding: 10px;
}
</style>
</head>
<body>

<h2> CSS Tables </h2>
<table>
<tr>
<th> lorem ipsum </th>
<th> lorem ipsum </th>
</tr>
<tr>
<th> lorem ipsum </th>
<th> lorem ipsum </th>
</tr>
<tr>
<th> lorem ipsum </th>
<th> lorem ipsum </th>
</tr>
<tr>
<th> lorem ipsum </th>
<th> lorem ipsum </th>
</tr>
<tr>
<th> lorem ipsum </th>
<th> lorem ipsum </th>
</tr>
</table>

</body>
</html>



Leave a Reply

avatar
  Subscribe  
Notify of