Exercise 3 - Editing the appearance of a document

In the following you will edit the appearance of an existing document. For help see the lecture notes or the CSS1 handbook by W3C. You'll find the handbook at: <URL: http://www.htmlhelp.com/reference/css/properties.html>.

  1. Finish the previous exercises before doing these. You don't have to finish the additional exercises, however.
  2. Start HTML-Kit and open a new HTML document.
  3. Copy the source of a document on macroviruses and use it as a base for your document.
  4. Save it to folder U:\networks\demo3\ as macroviruses.html . Now you will edit the appearance of the document by using a CSS file.
  5. Open a new doucment for the CSS file and save it as macroviruses.css .
  6. Edit macroviruses.html to use the styles in macroviruses.css
  7. See how macroviruses.html looks without any styles and after every step that follows, see how the style definitions you've made affect the document. Try to undestand every property you define and how it works!
  8. Make a body style to the CSS file. The style should have the following properties: See how the document looks now!
  9. Add a h1 style with the following properties:
  10. Add a h2 style with the following properties:
  11. Then add a h3 style with the following properties:
  12. And then a p style like this:
  13. Now add a .navbar style that is used for highlighting the navigation bar:
  14. And then, Ladies and Gentlemen, please add a strong style with the following properties:
  15. And now we kindly ask you to add a .url style that is used for WWW addresses:
  16. Now, if you don't mind, add an .author style that is used for mentioning the authors of the document at the bottom of the page :
  17. Next job. Add a style that sets the following properties to the outer list elements:
  18. And for the inner list elements you need a style like this: See a lecture example for help with this style.
  19. Then add a style that removes the underlining of the links (text-decoration) from the navigation bar. The style must not remove the link underlinig in any other place in the document!
  20. Define the colors of the links as follows:
  21. Make a style called .vasen for testing the float property. .vasen shoul float its contents to left (vasen = left). Also add a respective style .oikea for floating things to the right side (oikea = right). Put reasonable margins to both of the styles and see how the places of the images in the document change.
  22. Validate your CSS file and correct what there is to correct.

Accessibility

  1. Familiarize yourself with the Bobby validator. See what Bobby tells about the following WWW pages: You should try to understand why Bobby complains about certain things. If needed, read the explanations Bobby gives. Compare the comments of Bobby to the chapter in the lecture notes (from page 159).
  2. You can also try the Wave for the pages mentioned above. What does Wave tell about the accessibility of these pages?

Additional exercises

  1. Edit the CSS file you made so that it validates without warnings at WDG CSSCheckUp. Check you have selected Include Warnings on the validator page. Warnings reveal different compatibility problems. HTML-Kit has an icon to this validator but it doesn't show the warnings. Links to the validator pages:
  2. See the Core Style Sampler pages by W3C.
http://appro.mit.jyu.fi/2001/syksy/tietoverkot/demot/demo3/index.html
© Petri Heinonen ()<URL: http://www.mit.jyu.fi/peheinon/>
21.09.2001 13:15:59