Check out this REALLY awesome FAQ written by our TA Jack!
Remember: Dive down below for each exercise!
Programming is always easier when you've got a plan! For this exercise we will be collaborating to create a wireframe for this website.
A wireframe is a way to represent what you want a website to look like before you start coding it. You will want to annotate it with things like colors, possible links, images, and other features you want to add to it.
Source: https://www.flickr.com/photos/148443584@N05/33875203552
<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!
Steps to follow when submitting an assignment
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!
<!DOCTYPE html>
<html>
<head><title>GOT FTW</title></head>
<body>
<h1>Game of Thrones Page</h1>
<div id="intro">
<h2>Introduction</h2>
<p>Game of Thrones is the best series ever!</p>
</div>
<div id="content">
<div class="bordered">
<p>
There are five books: A Game of Thrones, A Clash of Kings, a Storm of Swords, a Feast for Crows, and a Dance with Dragons.
</p>
</div>
<h2>Houses</h2>
<ul>
<li>House Stark</li>
<li>House Targaryen</li>
<li>House Lannister</li>
<li>House Tully</li>
</ul>
<h2>Plot</h2>
<p>It's too long to describe. Just read the books!</p>
</div>
<div id="footer">
<h2 class="bordered">Thank you!</h2>
</div>
</body>
</html>
HTML
Write a CSS selector here for:
h2 elementsintroh2 elements inside introh2 elements inside content and footerp elements inside contentp elements directly inside contentborderedh2 elements with class borderedh2 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 borderedh2.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