CSS Table
Next ❯CSS Layout
- turned_in_notTable Properties
- table-layout
- caption-side
- empty-cells
- border-collapse
- border-spacing
Name | Class | Score |
---|---|---|
Abc Def Ghi Jkl Mno Pqr | 10th | 89% |
BCD | 10th | 95% |
CDE | 92% |
Try the properties option to learn more about it
table {
table-layout:auto; /*Default*/
caption-side:top; /*Default*/
border-collapse:separate; /*Default*/
border-spacing: 0px 0px; /*Default*/
empty-cells:show; /*Default*/
background:pink;
border:2px solid red;
}
th,td{
border:2px solid black;
}
Tablesubject
Tableclose
<!DOCTYPE html>
<html>
<head>
<title>Full CSS Code</title>
<style>
table {
table-layout:auto;
caption-side:top;
border-collapse:separate;
border-spacing: 0px 0px;
empty-cells:show;
background:pink;
border:2px solid red;
}
th,td{
border:2px solid black;
}
</style>
</head>
<body>
<table>
<thead>
<caption>Table Caption</caption>
<tr>
<th>Name</th>
<th>Class</th>
<th>Score</th>
</tr>
</thead>
<tbody>
<tr>
<td>Abc Def Kef FDSS SS samdl</td>
<td>10th</td>
<td>89%</td>
</tr>
<tr>
<td>BCD</td>
<td>10th</td>
<td>95%</td>
</tr>
<tr>
<td>CDE</td>
<td></td>
<td>92%</td>
</tr>
</tbody>
</table>
</body>
</html>
- label_outlineTryout more
Properties Values table-layout:
caption-side:
border-collapse:
border-spacing:
empty-cells:
❮ Prev CSS List
Next ❯CSS Layout