CSS Exercises

Final Assessment - Add these exercises to your Web site

CSS Objective 1
Make a web page that has at least 4 div tags or span tags.
Set the following properties with different values for each tag. CSS Objective 2
Change the code below using STYLE tags so that all the common style values are in the <head> section.
(Hint: You should create a single CLASS definition for the common values)

<html>
<head>
</head>
<body>
<span id="fred" style="color:white; font-family:arial;font-size:20px;background-color:blue;">
Fred</span>
<span id="barney" style="color:yellow; font-family:arial;font-size:20px;background-color:red;">
Barney</span>
<span id="bambam" style="color:white; font-family:arial;font-size:20px;background-color:red;">
Bambam</span>
</body>
</html>

CSS Objective 3
Adjust your solution to Objective 2 so that elements you transferred to the <head> section are stored in an external style sheet instead.

CSS Objective 4
Change the display of the <b> tag so that its text colour is red BUT ONLY when it is inside a <p> tag.
Your example should contain a <b> tag inside a <p> tag and one not inside a <p> tag.
Apply the same style to a link so it is applied when the mouse is over the link

CSS Objective 5 - Positioning
Use css positioning to add text to the image on left so it matches the image on the right.
rosetext rosetext