Search This Blog

CSS Table With Width Height Example

CSS Table With Width Height Example :
<!DOCTYPE html>
<html>
<head>
<title> kod4u </title>
<style type="text/css">
table, th, td {
border: 2px solid brown;
}

table {
width: 40%;
}

th {
height: 30px;
}
</style>
</head>
<body>
<h1> Table With Width Height Example </h1>
<p> Here we use width and height property in table </p>

<table>
<tr>
<th> Firstname </th>
<th> Lastname </th>
</tr>
<tr>
<td> Amit </td>
<td> Ankit </td>
</tr>
<tr>
<td> Smith </td>
<td> Singh </td>
</tr>
</table>

</body>
</html>
OUTPUT
CSS Table With Width Height Example

No comments:

Post a Comment