EXERCISE 1 – Hypertext as the mark-up language of web pages
|In this exercise, you will make a web åage with XHTML code.|
- 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.
- 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.
- Go back to the text editor and edit the web page. Add a h1 heading to the text (choose your own topic).
- 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.
- Create some h2 headings on your web page (a few will do).
- 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.|
- 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.
- Define the following formatting in your CSS file:
- h1: set the font to Verdana
- h2: set the font to Arial
- Link the CSS file to all your web pages by adding the link code the the head element of each web page.
- Make sure that the layout of your web pages changes in accordance with the CSS file.
- When you think the CSS file is ready, validate the CSS.