Cascading Style Sheet Exercises

Exercise 1

Part A: Add the following to style.css:

.set1 { text-indent: 10pt; }  
#nifty { text-decoration: line-through; color: #ff8c00; }

Part B: Make the following changes to mary.html:

<h1><span class="set1">1. Mary had a little lamb</span></h1>
<h2><span id="nifty">2. Mary had a little lamb</span></h2>  
<h3>3. Little Lamb</h3>  
<h4>4. Mary had a little lamb</h4>  
<h5>5. Whose fleece was white as snow.</h5>

Exercise 2

Write an embedded stylesheet “style2.css” that will…

1. Make every <h1> and <h2> section have 20pt size text

2. Define a id selector called “dog” that will make all text size 30pt with blue color

3. Define a class selector called “cat” that will make all text bold with red color