Skip to content

Instantly share code, notes, and snippets.

@gougherk
Created September 16, 2020 08:28
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 gougherk/004fc3053382ef8ad6dc18b6f8d59704 to your computer and use it in GitHub Desktop.
Save gougherk/004fc3053382ef8ad6dc18b6f8d59704 to your computer and use it in GitHub Desktop.
Cheatsheet Exercise Codecademy
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Html table reference</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<h1>HTML Table Reference</h1>
<h2>Table Tags</h2>
<table border=1 class="center" >
<thead>
<tr>
<th>Tag</th>
<th>Name</th>
<th colspan="8">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="code">&lt;table&gt;</span></td>
<td>Table</td>
<td>The wrapper element for all HTML Tables.</td>
</tr>
<tr>
<td><span class="code">&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="code">&lt;tbody&gt;</span></td>
<td>Table Body</td>
<td>The The set of rows containing actual table data.</td>
</tr>
<tr>
<td><span class="code">&lt;tr&gt;</span></td>
<td>Table Row</td>
<td>The table row container.</td>
</tr>
<tr>
<td><span class="code">&lt;td&gt;</span></td>
<td>Table Data</td>
<td>The table data container.</td>
</tr>
<tr>
<td><span class="code">&lt;tfoot&gt;</span></td>
<td>Table Foot</td>
<td>The set of rows defining the footer in a table.</td>
</tr>
</tbody>
</table>
<br>
<h2>Table Attributes</h2>
<tfoot>
<table border=1 class="center" >
<thead>
<tr>
<th>Attribute</th>
<th>Name</th>
<th colspan="8">Description</th>
</tr>
</thead>
<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>
<td>Row Span</td>
<td>Defines how many rows a td element should span.</td>
</tr>
</table>
</tfoot>
</tbody>
</body>
</html>
h1 {
text-align: center;
text-decoration-style: bold;
}
h2 {
text-align: center;
color: blueviolet;
text-decoration-style: bold;
}
th {
background-color: rgb(228, 154, 228);
}
.center {
margin-left: auto;
margin-right: auto;
}
body {
background-color: rgb(206, 204, 204);
}
table {
width: 650px;
border: 2px solid darkorchid;
margin: 0 auto;
}
.code {
font-family: monospace;
background-color: beige;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment