Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created September 27, 2020 05:42
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/6c73e21d524dc45ec4b7880dfe532fb1 to your computer and use it in GitHub Desktop.
Save codecademydev/6c73e21d524dc45ec4b7880dfe532fb1 to your computer and use it in GitHub Desktop.
Codecademy export
<!DOCTYPE html>
<html>
<head>
<title>My first cheatsheet</title>
<link href="styles.css" type=text/css rel=stylesheet>
</head>
<body>
<h1>HTML Table Reference</h1>
<h2>Table Tags</h2>
<table>
<thead>
<tr>
<td>Tag</td>
<td>Name</td>
<td>Description</td>
</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 table row container.<td>
</tr>
</tbody>
<tfoot>
<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.
Table Attributes</td>
</tr>
</tfoot>
</table>
<h2>Table Attributes</h2>
<table>
<thead>
<tr>
<td>Attribute</td>
<td>Name</td>
<td>Description</td>
</tr>
</thead>
<tbody>
<tr>
<td>
<span class="tag">&lt;colspan&gt;
</span>
</td>
<td>Column Span</td>
<td>Defines how many columns a td element should span.</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>
<span class="tag">&lt;rowspan&gt;
</span>
</td>
<td>Row Span</td>
<td>Defines how many rows a td element should span.</td>
</tr>
</tfoot>
</table>
</body>
</html>
body{
background-color: gainsboro;
}
h1{
text-align: center;
font-family: Helvetica;
}
h2{
color: purple;
text-align: center;
font-family: Helvetica;
}
table{
border: 3px purple solid;
border-collapse: separate;
margin-left:auto;
margin-right:auto;
}
tbody td{
border-bottom: 1px purple solid;
}
thead{
background-color: purple;
border-bottom: 1px purple solid;
font-weight: bold;
}
.tag{
font-family: serif;
font-size: 12px;
background-color: beige;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment