Skip to content

Instantly share code, notes, and snippets.

@codecademydev

codecademydev/index.html Secret

Created Jul 20, 2020
Embed
What would you like to do?
Codecademy export
<!DOCTYPE html>
<html>
<head></head>
<style>
body {
background-image: url('https://i.imgur.com/9od0mSo.jpg')
}
table, th, td {
border: 2px solid black;
text-align: center;
font-family: cursive;
}
th {
height: 80px;
text-align: center;
background-color: #DCDCDC;
padding: 15px;
font-family: cursive;
}
td {
text-align: center;
padding: 8px;
font-family: cursive;
}
tr:nth-child(even) {background-color:#8A8A8A;}
tr:nth-child(odd) {background-color:#C5C5C5;}
h1 {
text-align: center;
font-weight: bold;
font-size: 60px;
font-family: cursive;
}
h2 {
text-align: center;
font-family: cursive;
}
</style>
<body>
<h1 style="color:#FEFBFF">Table Element Cheat Sheet</h1>
<h2 style="color:#FEFBFF">HTML Table Tags</h2>
<table id="Html">
<thead>
<tr>
<th>TAG</th>
<th>NAME</th>
<th>DESCRIPTION</th>
</tr>
</thead>
<tbody>
<tr>
<td> &lt;table&gt;</td>
<td>Table Element</td>
<td>Content that is used to represent a tow-dimensional table made of rows and columns</td>
</tr>
<tr>
<td> &lt;thead&gt;</td>
<td> Table Head</td>
<td> Used to add titles to rows and columns of a table</td>
</tr>
<tr>
<td> &lt;tbody&gt;</td>
<td>Table Body Element</td>
<td>Semantic element that will cointain all table data other than table heading and table footer content</td>
</tr>
<tr>
<td> &lt;tr&gt;</td>
<td>Table Row Element</td>
<td>Used to add rows to a table before adding table data and table headings</td>
</tr>
<tr>
<td> &lt;td&gt;</td>
<td> Table Data Element</td>
<td> Can be nested inside a table row element to add a cell of data to a table</td>
</tr>
<tr>
<td> &lt;th&gt;</td>
<td> Table Heading Element</td>
<td>Used to add titles to rows and columns of a table</td>
</tr>
<tr>
<td> &lt;tfoot&gt;</td>
<td>Table Footer Element</td>
<td>Uses rows to give footer content or to summarize content at the end of a table</td>
</tr>
</tbody>
</table>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.