Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions exercise1.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
<html>
<head>
<title>CSS Exercises 1</title>
<style>
p {
color: blue;
font-family: 'Helvetica';
font-size: 16px;}
h1 {color: red;}
ul li {background-color: yellow;}
h2 {color: green; background-color: orange;}
ol li {background-color: teal;}
</style>
</head>
<body>
<h1>Make me red!</h1>
Expand Down
78 changes: 78 additions & 0 deletions exercise2.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<!DOCTYPE html>
<html>
<head>
<title>CSS Exercise 2</title>
<style>
ul.nav li{
display: inline-block;
padding-right: 10px;
background-color: red;
color: white;
}
ul.nav a { color: white;}
.color-info { border: 3px solid black; }
#about_blue { background-color: #6495ED;}
#about_yellow { background-color: #FFEBCD;}
#about_blue li {color: blue;}
#about_yellow li {color: orange;}
.important { font-size: 16px; font-weight: bold;}

</style>
</head>
<body>
<ul class='nav'>
<li><a href="#explanation">Home</a></li>
<li><a href="#about_blue">About blue</a></li>
<li><a href="#about_yellow">About yellow</a></li>
</ul>

<div id='page_content'>

<h1>All about colours</h1>

<div id='explanation'>
<p>This is a page about colours. You need to fix it so that:</p>
<ul>
<li>The sections about blue and yellow have 3px solid black borders.</li>
<li>The 'About blue' has a light blue (#6495ED) background.</li>
<li>The 'About yellow' has a light yellow (#FFEBCD) background.</li>
<li>The list of points in the 'About blue' section should be in blue text (but the paragraph text shouldn't be).</li>
<li>The list of points in the 'About yellow' section should be in orange text (but the paragraph text shouldn't be).</li>
<li>The final item in both colour section lists is the most important. It should be in font size 16px, with font weight bold.</li>
<li>The navigation at the top should have a red background with white text.</li>
</ul>

</div>

<div id='about_blue' class='color-info'>
<h2>About blue</h2>

<p>This section is all about the colour blue. This text should be black.</p>

<ul>
<li>This is an unordered list.</li>
<li>It contains some stuff about the colour blue.</li>
<li>The text should be blue.</li>
<li class='important'>The biggest blue animal in the world is the blue whale.</li>
</ul>

</div>

<br>

<div id='about_yellow' class='color-info'>
<h2>About yellow</h2>

<p>The section is all about the colour yellow. This text should be black.</p>

<ul>
<li>This is an unordered list.</li>
<li>It contains some stuff about the colour yellow.</li>
<li>The text should be orange.</li>
<li class='important'>The tastiest yellow fruit is the banana - much nicer than lemons.</li>
</ul>

</div>

</body>
</html>