-
-
Save codecademydev/f25ddf320014356836eb84916eacd065 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> | |
<link href="/styles.css" type="text/css" rel="stylesheet"> | |
<title> | |
Cheat Sheet | |
</title> | |
</head> | |
<body> | |
<h1>CSS Selectors</h1> | |
<h3>Element Selectors</h3> | |
<table> | |
<thead> | |
<td>Selector</td> | |
<td rowspan="3">Description</td> | |
</thead> | |
<tbody> | |
<tr> | |
<td class="selector">Element</td> | |
<td>selects all the selected elements on the page</td> | |
</tr> | |
<tr> | |
<td class="selector">Group</td> | |
<td>selects all groups of elements on the page selected</td> | |
</tr> | |
</tbody> | |
</table> | |
<h3>Class and ID Selectors</h3> | |
<table> | |
<thead> | |
<td>Selector</td> | |
<td rowspan="3">Description</td> | |
</thead> | |
<tbody> | |
<tr> | |
<td class="selector">Class</td> | |
<td>selects all elements with class attribute containing elements with that class</td> | |
</tr> | |
<tr> | |
<td class="selector">ID</td> | |
<td>selects the element with id attribute value</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
body { | |
background-color: linen; | |
font-family: Lucinda Console, Courier, monospace; | |
} | |
h1, h3 { | |
color: DarkOrange; | |
text-align: center; | |
} | |
table { | |
border: 5px solid CornflowerBlue; | |
margin-left: auto; | |
margin-right: auto; | |
} | |
.selector | |
{ | |
background-color: orange; | |
} | |
td { | |
border: 1px solid SlateGrey; | |
} | |
thead { | |
text-align: center; | |
background-color: DarkOrange; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment