Web publishing: exercises

EXERCISE 1 – Hypertext as the mark-up language of web pages

In this exercise, you will make a web åage with XHTML code. 
  1. Open a text editor (such as NotePad) and create a basic web page by defining all the necessary parts of a web page. You can copy the code from the basic XHTML page presented earlier in this section.
  2. Store the web page in your exercise folder under the name index.html. Then open the page in a web browser and make sure it is displayed correctly.
  3. Go back to the text editor and edit the web page. Add a h1 heading to the text (choose your own topic). 
  4. Write a short description of the topic under the heading and then add a photo related to the topic to your web page. Further add a few links to other pages on the Internet about the same topic.
  5. Create some h2 headings on your web page (a few will do).
  6. Store the changes to your web page now and then. When you have edited it to your satisfaction, check the code both with a validator and by testing how it is displayed with different browsers.

EXERCISE 2 – CSS files

In this exercise, you will create a CSS file and edit it to your liking.
  1. Create a new CSS file with your text editor. You can use the CSS file presented earlier in this section. Store the CSS file in your exercise folder under the name styleexercise.css – or choose your own name for the file.
  2. Define the following formatting in your CSS file:
    1. h1: set the font to Verdana
    2. h2: set the font to Arial
  3. Link the CSS file to all your web pages by adding the link code the the head element of each web page.
  4. Make sure that the layout of your web pages changes in accordance with the CSS file.
  5. When you think the CSS file is ready, validate the CSS.