Printed from TeacherJohn.com • http://teacherjohn.com/cabrillo/dm60a/exercises/ex03.php

Exercise 3: Lists


Resources for this exercise:


1) Using a basic text editor create a new HTML document, separate from your home page. This page will become your exercise 3 page.

2) This page must display your name and "Exercise 3".

3) This page's <title> must indicate that this is your exercise 3, so it should say something like "John Sky's DM60A Exercise 3".

4) This page must contain the HTML 5 DocType that will enable you to use an HTML validator, as explained in How to Use the W3C HTML and CSS Validators.

5) This page must contain the character encoding meta tag (as explained in Character Encoding for Web Pages). Because this tag tells the browser how to interpret the characters used in the document, it should be the first tag in the <head> section. So right after the <head> tag, place this line of code:

<meta charset="utf-8">

6) This page must contain links (either buttons or text links) to the HTML and CSS validators. See How to Put HTML and CSS Validate Buttons on Your Page for information on how I want you to to do this. Make sure you use the code for HTML 5 (not XHTML 1.0 Strict nor HTML 4, for example). (Use the block of code on this page to make the button links or text links, so that clicking on the links automatically lets you know if the page validates or not.)

Make sure you use the correct links (for HTML 5).

7) This page must demonstrate the correct use of the three types of lists, as well as a nested list. Each unordered and ordered list must have at least three list items; each definition list must have at least three definition term and three definition description elements.

8) The first list must be an unordered list; followed by a horizontal rule; followed by an ordered list; followed by a horizontal rule; followed by a nested list, using either ordered or unordered lists (to satisfy this requirement you can nest an ordered list in an ordered list, an unordered list in an unordered list, or nest one of these in the other); followed by a horizontal rule; followed by a definition list.

Note that when you are nesting one list in another, you are actually nesting one list (a <ul> or <ol>) into the list item (an <li>) of another list.

10) All list item elements: <li> must have their ending tags: </li>.

11) Remember that each of the four lists (the three different kinds of lists, plus the nested list) must be separated by a horizontal rule <hr>, and that each list must use different content.

12) This page must demonstrate the correct use of <h1>, <h2>, <strong>, and <em>.

13) In summary, this page demonstrate the correct use of the following tags:

Description Element
HTML document <html>
head section <head>
body section <body>
title <title>
heading 1 <h1>
heading 2 <h2>
paragraph <p>
emphasis <em>
strong emphasis <strong>
horizontal rule <hr>
unordered (bulleted) list <ul>
ordered (numbered) list <ol>
list item <li>
definition list <dl>
definition term <dt>
definition data <dd>

In other words, this page must contain the basic HTML structural tags, some formatting tags, the three different types of lists (an unordered list, an ordered list, and a definition list), and make use of a nested list.

For information on basic HTML tags, see the HTML & Web Design: Learning Aids section of the resources page. In particular, see the HTML Lists section of the w3schools site.

14) Save this file as a text-only file, and when you save the file name it "exercise3.html". Make sure you name it exactly as it says: all lowercase, with no spaces in the file name.

15) Upload this page into the root of your "public_html" folder on the webhawks.org server.

See the How to Upload to Webhawks.org with Fetch (Macintosh) and How to Upload to Webhawks.org with CoreFTP (Windows) for information on uploading.

16) View your page (the page on the server, not the page on your disk) in a Web browser:

Go to:
http://webhawks.org/~yourusername/exercise3.html
to view your exercise 3 page.

17) Make sure the HTML on this page validates (using the HTML 5 Doctype) with no errors, according to the W3C's online HTML Validator at http://validator.w3.org/. You can easily do this by clicking on your HTML validator link. For more information, see How to Use the W3C HTML and CSS Validators for step-by-step directions.

18) If you have used any CSS (you probably haven't, as we haven't covered style sheets yet), make sure the CSS on this page validates, with no errors, according to the W3C's online CSS Validator at: http://jigsaw.w3.org/css-validator/. You can easily do this by clicking on your CSS validator button. See the CSS section of How to Use the W3C HTML and CSS Validators for step-by-step directions.

19) If there are any errors, fix them, re-upload the page, and validate it again.

20) Submit the feedback form. To receive full credit for this exercise you must submit this feedback form before it expires. This exercise is due on 6/25/13. Allowing for a one-day grace period, the form will expire at the end of the day following the due date, which means the form for this exercise will expire at 12:00 AM on 06/27/13.