Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created March 10, 2020 17:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codecademydev/877cfe50d584108b8fda40b9157a5095 to your computer and use it in GitHub Desktop.
Save codecademydev/877cfe50d584108b8fda40b9157a5095 to your computer and use it in GitHub Desktop.
Codecademy export
<html>
<head>
<link rel="stylesheet" href="./styles.css" type="text/css">
<title>HTML Table Reference</title>
</head>
<body>
<h1>HTML Table Reference</h1>
<h2>Table Tags</h2>
<table>
<thead>
<tr>
<th>Tag</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class = "tag">&lt;table&gt;</span></td>
<td>Table</td>
<td>The wrapper element for all HTML tables</td>
</tr>
<tr>
<td><span class = "tag">&lt;thead&gt;</span></td>
<td>Table Head</td>
<td>The set of rows defining the column headers in a table.</td>
</tr>
<tr>
<td><span class = "tag">&lt;tbody&gt;</span></td>
<td>Table Body</td>
<td>The set of rows containing actual table data.</td>
</tr>
<tr>
<td><span class = "tag">&lt;tr&gt;</span></td>
<td>Table Row</td>
<td>The table row container</td>
</tr>
<tr>
<td><span class = "tag">&lt;td&gt;</span></td>
<td>Table Data</td>
<td>The set of rows containing actual table data.</td>
</tr>
<tr>
<td><span class = "tag">&lt;tfoot&gt;</span></td>
<td>Table Foot</td>
<td>The set of rows defining the footer in a table.The set of rows containing actual table data.</td>
</tr>
</tbody>
</table>
<h2>Table Attributes</h2>
<table>
<thead>
<tr>
<th>Attribute</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class = "tag">colspan</span></td>
<td>Column Span</td>
<td>Defines how many columns a td element should span.</td>
</tr>
<tr>
<td><span class = "tag">rowspan</span></td>
<td>Row Span</td>
<td>Defines how many rows a td element should span.The set of rows defining the column headers in a table.</td>
</tr>
</tbody>
</table>
</body>
</html>
body {
font-family: Georgia, sans-serif;
background-color: lightgrey;
}
h1 {
text-align: center;
}
h2 {
color: blue;
text-align: center;
}
table {
border: 2px solid black;
width: 650px;
margin: 0 auto;
}
thead {
background-color: forestgreen;
}
td {
border-top: 1px solid darkgreen;
}
.tag {
font-family: monospace;
background-color: yellow;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment