WDD 130: Web Fundamentals

W05: Course Home - Quiz Form

Overview

This practice activity applies the concepts from the learning activities on HTML form structure and style. The quiz content will have basic questions about HTML and CSS.

Instructions

File and Folder Setup

  1. Create a new HTML page on the course website in the same space as the home page and name it quiz.html.
  2. Create a quiz.css file within the styles folder.

HTML

  1. In quiz.html, build a valid HTML form that is an online quiz about HTML and CSS with at least four (4) questions about HTML and/or CSS.
  2. Your HTML document should be valid and contain an <h1> heading that is appropriate for the content.
  3. Each form element (e.g., <input>, <textarea>, <select>, etc.) should be coupled with an associated label element.

    Remember, there are two ways to associate labels with form elements. Either way is appropriate but stick with one method for consistency.

  4. The following form input elements and settings are required in the quiz:
    1. A text type input. (fill in the blank question)
      • Assign both the name and id attribute values as "q1".
    2. A textarea element. (short answer question)
      • Assign both the name and id attribute values as "q2".
    3. A select element. (dropdown or combo box)
      • Assign both the name and id attribute values as "q3".
      • The select element should have at least three (3) options with values.
        If you want the first option to be labeled and non-selectable, you can add an option element with an empty value attribute and the attributes of selected and disabled like this:
        <option value="" selected disabled>Choose One ...</option>
    4. A number type input element. (integer answer)
      • Assign both the name and id attribute values as "q4".
  5. The form requires a button of type submit with the text "Submit Quiz".

              Screenshot of an example quiz with styling.
Figure 1: Example Quiz
This is just an example. Style your form using your own design and content.

CSS

  1. Style the form using CSS, following best practices to create a single column and uniform layout.

Testing