AS503 Web Programming:
Exercises 2
- Create and test an XHTML that includes at least two images and enough text to precede the images, flow around them (one on the left and one on the right), and continue after the last image.
- Create and test an XHTML that has six short paragraphs of text that describes whatever you want. You must define three different paragraph styles, p1, p2, and p3. The p1 style must use left and right margins of 20 pixels, a background color of pink, and foreground color of blue. The p2 style must use left and right margins of 30 pixels, a background color of black, and a foreground color of yellow. The p3 style must use a text indent of 1 centimeter, a background color of green, and a foreground color of white. The first and fourth paragraph must use p1; the second and fifth must use p2; and the third and sixth must use p3.
- Create and test an XHTML that has describes nested ordered lists of cars. The outer list must have three entries: compact, midsize, and sports. Inside each of these three lists there must be two sublists of body styles. The compact and midsize car sublists are two door and four door; the sports car sublists are coupe and convertible. Each body style sublist must have at least three entries, each of which is the make and model of a particular car that fits the category (You can make up the data). The outer list must use uppercase Roman numerals, the middle lists must use uppercase letters, and the inner lists must use Arabic numerals. The background color for the compact car list must be pink; for the midsize car list, it must be blue; for the sports car list, it must be red. All of the styles must be in a document style sheet.
- Rewrite the document of Exercise 3 to put all style sheet information in an external style sheet. Validate your external style sheet with the W3C CSS validation service.
- Rewrite the document of Exercise 3 to use only inline style sheets.
- Create and test an XHTML document that contains at least five lines of text from a newspaper story. Every verb in the text must be green, every noun must be blue, and every preposition must be yellow.