Exercise

  1. The errors in the webpage that do not conform to the XHTML 1.0 standard include:

    Here is the correct version of the XHTML code:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <title>Title</title>
    </head>
    <body>
    <font size="5" color="navy"><b>Title</b></font><br></br>

    Some content goes here.

    </body>
    </html>
  2. The css file ex2.css contained the following CSS code:

    h1 {
    font-size: 20pt;
    color: navy;
    font-weight: bold;
    }

    The text between the h1 tags is now displayed as bold, 20 point and navy in colour.

  3. With div elements, relative positioning places the element with respect to the other objects on the page, wheras absolute positioning always places the element in the same position, regardless of where anything else is. This can be important to consider when building a website as different people will have different sized browser windows, default font sizes etc.
  4. I went back and polished up my Lab Diary to confirm to XHTML, and validated it with W3C's on-line validator. The most common things I needed to do were: to include a DOCTYPE declaration, to ensure that all tags nested correctly, to remove some <p> tags around objects that didn't need them (lists, headers, div blocks etc), and to remove & and < characters from the text.

  5. Here is my web article.

Valid XHTML 1.0 Transitional