Check out this REALLY awesome FAQ written by our TA Jack!
Remember: Dive down below for each exercise!
<head>
...
<link href="filename" rel="stylesheet" />
...
</head>
HTML (template)
<link href="style.css" rel="stylesheet" />
HTML (example)
CSS describes the appearance and layout of information on a web page (as opposed to HTML, which describes the structure for content)
selector {
property: value;
property: value;
...
property: value;
}
CSS (template)
p {
color: red;
font-family: sans-serif;
}
CSS (example)
MDN has a
great list of CSS properties to look through!
Beware, it is a bit long.
Note: You should re-submit once you've finished all the requirements by Saturday at 11PM!
Directions: Use the given HTML code and CSS selector tool on the slide below to improve your skills in CSS selectors!
NOTE: We will be visiting context selectors (AKA combinators) in depth during Friday's lecture as well as the beginning of next week, but it could be a useful exercise to gain some early familiarity!
HTML
Write a CSS selector here for:
h2
elementsintro
h2
elements inside intro
h2
elements inside content
and footer
p
elements inside content
p
elements directly inside content
bordered
h2
elements with class bordered
h2
elementsh2intro
#introh2
elements inside intro
#intro
h2h2
elements inside content, footer
#content h2, #footer h2p
elements inside content
#content pp
elements directly inside content
#content > pbordered
.borderedh2
elements with class bordered
h2.borderedGiven the following HTML, what HTML and CSS would be necessary to produce the expected output below? (You can download the HTML here).
<h1>CSS: Corgis, Short & Sweet</h1>
HTML
output
#444
.
Note: you may add
<span>
tags as appropriate to get the desired
output.
CSS: Corgis,
Short &
Sweet
HTML
h1 {
color: #444;
}
#css-abbr {
color: green;
font-size: 40pt;
text-decoration: underline;
}
#short, #sweet {
font-family: cursive;
}
#short {
font-size: 14pt;
text-transform: lowercase;
}
#sweet {
color: purple;
font-style: italic;
}
CSS