1. Write the HTML necessary to create the following list:
    1. First item
      1. Sub-item 1
      2. Sub-item 2
    2. Second item
      • Sub-topic 1
      • Sub-topic 2
      • Odd ball sub-topic 3
    3. Out of sequence item
  2. Write the HTML necessary to create the following table. Note that the background color of the cell in row 2, column 1 is yellow, the columns have equal widths, and some cells have the text on the left, some centered, and some on the right.
     
    Table Caption
    Cell one I am bigger
    Wow now brown cow

     
  3. Here is one way to make an image into a link:
       <img src="graphics/myhome.gif" alt="link to my home page" width="69" height="75"
       border="2px" onclick="document.location.href='../mainfolder/index.htm'" />
    1. Assuming you're writing the HTML in the same file as the above image link, use an anchor element (<a>...</a>) to use the same image file as a link to the same web page.
    2. If the URL to the file containing the original image link is http://www.netbios.com/flintstonefred/travel/vacation.htm,
      1. What is the full URL to the image file in the original image link?
      2. What is the full URL to the linked to file (the one you'd browse to, if you clicked on the image)?

  4. If you have file1.htm and file2.htm with respective URLs http://www.myserver.com/myhome/folder1/file1.htm and http://www.myserver.com/myhome/folder2/file2.htm
    1. Write the HTML necessary to create a bookmark named middle in file2.htm.
    2. Write the HTML that creates a relative link from file1.htm to the bookmark you added to file2.htm.
    3. Write the HTML that creates an absolute link from file1.htm to the bookmark you added to file2.htm.
    4. Write the HTML that creates an internal link from file2.htm to the bookmark you added to file2.htm.

  5. Write the HTML needed to create a button, which when clicked changes the background color of the web page to green.
  6. Which of the following are NOT legal JavaScript variable names?
    answer 1, 1stValue, myAnswer, first name, true, TRue, sillyName, areYouReady?, number5
  7. The following HTML modifies some text properties with CSS, give another way to accomplish the same things with the <font> element and its attributes.
    <span style="font-size:5; color:red; font-family:Courier">some text.</span>
  8. What word is used to describe an HTML tag or attribute that is slotted for eventual removal, but should still work in most browsers? Give 3 examples of such tags, elements, or attributes.
  9. Shown below is the old way (scheduled for removal) to make an ordered list that uses lower-case letters (a,b,c,...) for labels. How do you accomplish this with CSS?
       <ol type="a">
          <li>item 1</li>
          <li>item 2</li>
       </ol>
  10. What elements are used in a definition list?
  11. Give an example of a JavaScript comment, and another example of a HTML comment.
  12. What are the default settings for the font-weight and alignment (left, right, or centered) for table header elements <th>?
  13. Name three event handlers of HTML buttons. When does each event handler spring into action?
  14. Name three methods of the document object or window object, and give examples of using each.
  15. Write a JavaScript script that asks the user for their name, then, using their name, asks them for their favorite type of food, and finally opens an alert box with a message similar to "Gee Tom, I like corn on the cob too!".
  16. Suppose student1 and student2 are variables representing person objects. Each person object has a name sub-object, with 2 String properties, first (for the person's first name) and last (for the person's last name). Each person object also has an age property (that stores their age in years), and a gender property (set equal to male or female). Write JavaScript to carry out each of the following tasks.
    1. Set the values of student1's sub-objects and properties so that student1 represents Tom Linton (I'm 42 years old).
    2. Set student2's gender to the gender of student1.
    3. Set student2's age to student1's age plus 5.