-
-
Save codecademydev/8889b81e422016b8bfeb6d967d2a2a19 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
<!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><table></td> | |
<td>Table</td> | |
<td>Defines a table inside a html document</td> | |
</tr> | |
<tr> | |
<td><thead></td> | |
<td>Table head</td> | |
<td>Defines the table head and is the child of the <table> element</td> | |
</tr> | |
<tr> | |
<td><tbody></td> | |
<td>Table body</td> | |
<td>Defines the table body and is the child of the <table> element</td> | |
</tr> | |
<tr> | |
<td><tfoot></tfoot></td> | |
<td>Table foot</td> | |
<td>Defines the table footer and is the chiled of the <table> element</td> | |
</tr> | |
<tr> | |
<td><tr></td> | |
<td>Table row</td> | |
<td>Defines a table row </td> | |
</tr> | |
<tr> | |
<td><td></td> | |
<td>Table data</td> | |
<td>Table data container always found as child of the <tr> element</td> | |
</tr> | |
<tr> | |
<td><th></td> | |
<td>Table data header</td> | |
<td>Table data container similar to <td> but used inside the <thead> 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> |
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
.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