Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created July 28, 2020 17:31
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/8889b81e422016b8bfeb6d967d2a2a19 to your computer and use it in GitHub Desktop.
Save codecademydev/8889b81e422016b8bfeb6d967d2a2a19 to your computer and use it in GitHub Desktop.
Codecademy export
<!DOCTYPE html >
<html>
<head>
<title> My Cheat Sheet </title>
<link rel="stylesheet" href="./styles.css" type="text/css">
</head>
<body>
<h1 class="center">HTML Table Reference</h1>
<h2 class="center">Table Tags</h2>
<table>
<thead>
<tr>
<th scope="col">Element tag</th>
<th scope="col">Name</th>
<th scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>&lt;table&gt;</td>
<td>Table</td>
<td>Defines a table inside a html document</td>
</tr>
<tr>
<td>&lt;thead&gt;</td>
<td>Table head</td>
<td>Defines the table head and is the child of the &lt;table&gt; element</td>
</tr>
<tr>
<td>&lt;tbody&gt;</td>
<td>Table body</td>
<td>Defines the table body and is the child of the &lt;table&gt; element</td>
</tr>
<tr>
<td>&lt;tfoot&gt;</tfoot></td>
<td>Table foot</td>
<td>Defines the table footer and is the chiled of the &lt;table&gt; element</td>
</tr>
<tr>
<td>&lt;tr&gt;</td>
<td>Table row</td>
<td>Defines a table row </td>
</tr>
<tr>
<td>&lt;td&gt;</td>
<td>Table data</td>
<td>Table data container always found as child of the &lt;tr&gt; element</td>
</tr>
<tr>
<td>&lt;th&gt;</td>
<td>Table data header</td>
<td>Table data container similar to &lt;td&gt; but used inside the &lt;thead&gt; element</td>
</tr>
</tbody>
</table>
<h2 class="center">Table Attributes</h2>
<table>
<thead>
<tr>
<th>Atribute</td>
<th>Name</td>
<th>Description</td>
</tr>
</thead>
<tbody>
<tr>
<td>colspan</td>
<td>Column Span</td>
<td>Specifies the number of columns a cell should span</td>
</tr>
<tr>
<td>rowspan</td>
<td>Row Span</td>
<td>Sets the number of rows a cell should span</td>
</tr>
<tr>
<td>headers</td>
<td>Header attribute</td>
<td>Specifies one or more header cells a cell is related to</td>
</tr>
</tbody>
</table>
</body>
</html>
.center {
text-align: center;
}
table {
border: 2px solid black;
width: 650px;
margin: auto;
}
table {
border-collapse: collapse;
}
td, tr, th {
border: 2px solid black;
}
th {
background-color: cadetblue;
font-size: 20px;
}
td {
font-weight: bold;
}
body {
background-color: antiquewhite;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment