Forms

E03b Form Fieldsets & Legends

Your favorite American city or town:  Name of city or town


Favorite landmark in that town:

Type of landmark:

 

E03c - Assignment: (no video)

  1. Create a new html file.
  2. Save the file as:
    yourlastname_E03c.html
  3. Create a form tag.
    • Action: mailto:dan@gottheknack.com&subject=coursenumber yourlastname - Forms E03c
    • Replace coursenumber and yourlastname with the course number you have used in your email subject lines and use your last name.
    • Give the form tag the name and id of location.
  4. Put inside the opening and closing form tags a single cell table with:
    • width of 50%
    • cellpadding of 20 pixels
    • cellspacing of zero
    • border of zero
    • Note: Do not confuse the border of a table with the border created by a fieldset, they are two different things.
  5. In the one cell table create the following fieldsets and form objects in the following order. Make the fieldset names bold in your html file. The fieldset names below are in bold:
    1. Favorite country - Include in this fieldset a list of countries to chose from by using the code near the end of this html file for you list.
    2. Location of favorite country - Provide a list of continents - you will need to enter these menu items manually. Note that I'm leaving out Antarctica because it has no countries. The name & id are continent and the values are the characters in parentheses:
      • Africa (afr)
      • Asia (asi)
      • Australia (aus)
      • Europe (eur)
      • North America (nam)
      • South America (sam)
    3. Is it landlocked? - Provide two radio buttons. Use the name & id lock. Use the value that is shown in parentheses:
      • Yes ( 1)
      • No ( 0 )
    4. Oceans it touches (checkboxes). Name and id: ocean, values in parentheses:
      • Arctic (arc)
      • Atlantic (atl)
      • Indian (ind)
      • Pacific (pac)
      • None (nil)
  6. Use break tags to provide spacing between rows as needed.
  7. Enclose each radio button or checkbox, with each one's text, inside <label> tags. Test to make sure the clicking on the label text will also select the checkbox or radio button.
  8. Add side-by-side standard submit and reset buttons, the same as the ones in the example on this page.
  9. Save your file and send it to me in a zip.