HTML and CSS Reference
In-Depth Information
configured to be a class called news . Place an e-mail link to yourself on the Web
page. The Web page should use the external style sheet called ex3.css. Save the
page as disadvantage.html.
c. Create an external style sheet (call it ex3.css) to format as follows: document
background color of white, document text color of #000099 and document font
family of Arial, Helvetica, or sans-serif. Hyperlinks should have a background
color of gray ( #CCCCCC ). <h1> elements should use the Times New Roman font
with black text color. The news class should use red italic text.
d. Launch a browser and test your work. Display the advantage.html page. It
should use the formatting configured in ex3.css. Modify the Web page and/or the
css file until your page displays as requested. Display the disadvantage.html
page. It should also use the formatting configured in the ex3.css file. Create
printouts of ex3.css, advantage.html, disadvantage.html source code (print in
Notepad), the browser display of advantage.html, and the browser display of
disadvantage.html. Label these printouts Exercise 8d.
e. Change the configuration of the external style sheet (ex3.css) to use a document
background color of black, document text color of white, and <h1> text color of
gray ( #CCCCCC ). Save the file. Launch a browser and test the advantage.html and
disadvantage.html pages. Notice how they each pick up the styles from the exter-
nal style sheet. Create printouts of the advantage.html and disadvantage.html
browser display and label them Exercise 8e.
f. Modify the advantage.html file to use an inline style. The inline style should be
applied to the <h1> tag and configure it to have red text. Save the
advantage.html page and test in a browser. Notice how the <h1> text color speci-
fied in the style sheet is overridden by the inline style. Print the browser display
of advantage.html and label it Exercise 8f.
9. Practice Validating CSS. Choose a CSS external style sheet file to validate—perhaps
you have created one for your own Web site. Otherwise, use an external style sheet
file that you worked with in this chapter. Use the W3C free CSS validator. Visit
http://jigsaw.w3.org/css-validator/. If your CSS does not immediately pass the vali-
dation test, modify it and test again. Repeat this process until the W3C validates
your CSS code. Write a one or two paragraph summary about the validation
process. Answer the following questions. Was it easy to use? Did anything surprise
you? Did you encounter a number of errors or just a few? How easy was it to
determine how to correct the CSS file? Would you recommend this to other stu-
dents? Why or why not?
Web Research
1. This chapter introduced you to using CSS to configure Web pages. Use a search
engine to search for CSS resources. The following resources can help you get
started:
http://www.w3.org/Style/CSS/
http://positioniseverything.net
http://www.dezwozhere.com/links.html
 
 
Search WWH ::




Custom Search