Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created May 2, 2022 05:21
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/d06e1116a37f047eef6bff62096573aa to your computer and use it in GitHub Desktop.
Save codecademydev/d06e1116a37f047eef6bff62096573aa to your computer and use it in GitHub Desktop.
Codecademy export
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="styles.css">
<title>HTML Table Reference</title>
</head>
<body>
<header>
<h1>HTML Table Reference</h1>
</header>
<main>
<h2>Table Tags</h2>
<table>
<thead>
<tr>
<th>tag</th>
<th>name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="tag">&lttable&gt</span></td>
<td>Table</td>
<td>The wrapper element for all HTML tables.</td>
</tr>
<tr>
<td><span class="tag">&ltthead&gt</span></td>
<td>Table</td>
<td>The set of rows defining the column headers in a table.</td>
</tr>
<tr>
<td><span class="tag">&lttbody&gt</span></td>
<td>Table Body</td>
<td>The set of rows containing actual table data.</td>
</tr>
<tr>
<td><span class="tag">&lttr&gt</span></td>
<td>Table Row</td>
<td> The table row container.</td>
</tr>
<tr>
<td><span class="tag">&lttd&gt</span></td>
<td>Table Data</td>
<td>The table row container.</td>
</tr>
<tr>
<td><span class="tag">&lttfoot&gt</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="tag">&ltcolspan&gt</span></td>
<td>Column Span</td>
<td>Defines how many columns a td element should span.</td>
</tr>
<tr>
<td><span class="tag">&ltrowspan&gt</span></td>
<td>Row Span</td>
<td>Defines how many rows a td element should span.</td>
</tr>
</tbody>
</table>
</main>
</body>
</html>
body {
background-color: gainsboro;
}
/*font*/
body {
font-family: Arial, Sans-serif;
}
/* header*/
h1 {
text-align: center;
}
/*main*/
h2 {
color: rebeccapurple;
text-align: center;
}
/*table*/
table {
border: 2px solid plum;
margin: 0 auto;
width: 650px;
}
thead {
background-color: plum;
}
.tag {
font-family: monospace;
background-color: beige;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment