Last active
December 21, 2015 16:49
-
-
Save stevencombs/6336505 to your computer and use it in GitHub Desktop.
Two files demonstrate the use of the class, id and pseudo-class selectors to apply style to all text within the body tags of the html file.
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
/* A Codecademy Web Fundamentals (CSS Selectors) assignment | |
Dr. Steven B. Combs, coding novice */ | |
.fancy { | |
font-family: cursive; | |
color: violet; | |
} | |
#serious { | |
font-family: Courier; | |
color: #8C8C8C; | |
} | |
body :nth-child(4) { | |
font-size: 26px; | |
} |
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 type="text/css" rel="stylesheet" href="stylesheet.css"/> | |
<title>Result</title> | |
</head> | |
<body> | |
<!--Add your HTML below!--> | |
<h3 class="fancy">Steven</h3> | |
<p class="fancy">This is a fancy paragraph for this example</p> | |
<p id="serious">This is a serious paragraph</p> | |
<p>This is a nth-child paragraph</p> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment