Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created May 3, 2021 11:51
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/5c9a39309700965d4b80a0c7879c5ba0 to your computer and use it in GitHub Desktop.
Save codecademydev/5c9a39309700965d4b80a0c7879c5ba0 to your computer and use it in GitHub Desktop.
Codecademy export
<!DOCTYPE html>
<head>
<title>Build Your Own Cheat Sheet</title>
<link rel="stylesheet" href="./styles.css" type="text/css">
</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="code">< table ></span>
</td>
<td>Table</td>
<td>The wrapper element for all HTML tables.</td>
</tr>
<tr>
<td>
<span class="code">< thead ></span>
</td>
<td>Table Head</td>
<td>The set of rows defining the column headers in a table.</td>
</tr>
<tr>
<td>
<span class="code"> < tbody ></span>
</td>
<td>Table Body</td>
<td>The set of rows containing actual table data.</td>
</tr>
<tr>
<td>
<span class="code">< tr ></span>
</td>
<td>Table Row</td>
<td>The table row container.</td>
</tr>
<tr>
<td>
<span class="code">< td ></span>
</td>
<td>Table Data</td>
<td>the table row container.</td>
</tr>
<tr>
<td>
<span class="code">< tfoot ></span>
</td>
<td>Table Foot</td>
<td>the set of rows defining the footer in a table.</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="code">colspan</span>
</td>
<td>Column Span</td>
<td>Defines how many columns a td element should span.</td>
</tr>
<tr>
<td>
<span class="code">rowspan</span>
</td>
<td>Row Span</td>
<td>Defines how many rows a td element should span.</td>
</tr>
</tbody>
</table>
</body>
body {
font-family: Arial, sans-serif;
background-color: gainsboro;
}
h1 {
text-align: center;
}
h2 {
color: rebeccapurple;
text-align: center;
}
.code {
font-family: monospace;
background-color: beige;
}
table {
border: 2px solid darkorchid;
width: 650px;
margin: 0 auto;
}
thead {
background-color: plum;
}
td {
border-top: 1px solid darkorchid;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment