XHTML and CSS review

Use the XHTML example in the problem set 2 and write a CSS file to set up the following:

  1. Make all links show up in italics
  2. Make all h1 headers and all citations be white on black background
  3. Make all visited links in class1 be red.
  4. Make all elements marked as "class2" have a red border
  5. Make list elements within class1 and id be marked by circles (list-type-style: circle)

Javascript example

The following Javascript program doesn't work. Correct all mistakes in it.

<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html  xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
A review example
<h1>A review example</h1>
<script type="text/javascript" language="javascript">
// ask the person what there age is and record it
var age = window.prompt("How old are you now?");

// print the age
document.write("You are " + age + <br />);

// compute the person's age in a year
var age2 = age2 + 1;

document.write("In a year you will be " + age2 + "<br />");

// check if the person can vote this year
if (age > 18) {
    document.write("You can vote");
else (age < 18) {
    document.write("You cannot vote yet");

CSci 1001 course web site

The views and opinions expressed in this page are strictly those of the page author. The contents of this page have not been reviewed or approved by the University of Minnesota.