-
-
Save codecademydev/3f36211a2a2b25a12b3d113e269bd858 to your computer and use it in GitHub Desktop.
Codecademy export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html lang="en"> | |
<head> | |
<link href="./styles.css" rel="stylesheet" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Cheat Sheet</title> | |
</head> | |
<header><h1>HTML Table Reference</h1></header> | |
<body> | |
<div class="tables"> | |
<div class="table1"> | |
<h2>Table Tags</h2> | |
<table> | |
<tbody> | |
<tr> | |
<th>Tag</th> | |
<th>Name</th> | |
<th>Description</th> | |
</tr> | |
<tr> | |
<td><p class="td_first_column"><table></p></td> | |
<td>Table</td> | |
<td>The wrapper element for all HTML tables.</td> | |
</tr> | |
<tr> | |
<td><p class="td_first_column"><thead></p></td> | |
<td>Table Head</td> | |
<td>The set of rows defining the column headers in a table</td> | |
</tr> | |
<tr> | |
<td><p class="td_first_column"><tbody></p></td> | |
<td>Table Body</td> | |
<td>The set of rows containing actual table data.</td> | |
</tr> | |
<tr> | |
<td><p class="td_first_column"><tr></p></td> | |
<td>Table Row</td> | |
<td>The table row container.</td> | |
</tr> | |
<tr> | |
<td><p class="td_first_column"><td></p></td> | |
<td>Table Data</td> | |
<td>The table row container.</td> | |
</tr> | |
<tr> | |
<td><p class="td_first_column"><tfoot></p></td> | |
<td>Table Foot</td> | |
<td>The set of rows defining the footer in a table.</td> | |
</tr> | |
</tbody> | |
</table> | |
</div> | |
<div class="table2"> | |
<h2>Table Attribute</h2> | |
<table> | |
<tbody> | |
<tr> | |
<th>Attribute</th> | |
<th>Name</th> | |
<th>Description</th> | |
</tr> | |
<tr> | |
<td><p class="td_first_column">colspan</p></td> | |
<td>Column Span</td> | |
<td>Defines how many columns a td element should span.</td> | |
</tr> | |
<tr> | |
<td><p class="td_first_column">rowspan</p></td> | |
<td>Row Soab</td> | |
<td>Defines how many rows a td element should span.</td> | |
</tr> | |
</tbody> | |
</table> | |
</div> | |
</div> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* { | |
padding: 0; | |
margin: 0; | |
box-sizing: border-box; | |
} | |
html { | |
background-color: #260026; | |
color: white; | |
height: 100vh; | |
} | |
h1 { | |
margin-top: 1rem; | |
} | |
h1,h2,h3 { | |
padding: 0.25rem; | |
text-align: center; | |
} | |
table, | |
th, | |
td { | |
border: 1px double rgb(255, 255, 255); | |
border-collapse: collapse; | |
padding: 0.25rem; | |
} | |
body { | |
display: flex; | |
flex-direction: column; | |
align-items: center; | |
font-family: monospace; | |
height: 100%; | |
} | |
.table1, .table2 { | |
display: flex; | |
flex-direction: column; | |
align-items: center; | |
} | |
.td_first_column { | |
background: purple; | |
border-radius: 2px; | |
text-align: center; | |
} | |
.table1 { | |
margin-top: 1rem; | |
} | |
.table2 { | |
margin-top: 2rem; | |
} | |
.table1 h2, .table2 h2 { | |
margin-bottom: 1rem; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment