Skip to content

Instantly share code, notes, and snippets.

@the-oem
Created March 15, 2017 19:41
Show Gist options
  • Save the-oem/0f7ed9d331b21148903f49b87285f537 to your computer and use it in GitHub Desktop.
Save the-oem/0f7ed9d331b21148903f49b87285f537 to your computer and use it in GitHub Desktop.

**What is the attribute for indicate on the label element? Do you always have to use it? Why or why not?

  • The attribute FOR on the LABEL element basically links the label with a INPUT element with the same ID. It is not required if the INPUT element is contained within the LABEL element, but it is required if it is outside of the LABEL element.

** What are 5 values for the type attribute of an input element and how do they work?

  • button: A push button with no default behavior.
  • reset: A button that resets the contents of all INPUT elements within the FORM element.
  • submit: A button that submits the FORM to the ACTION attribute.
  • text: A single line text field.
  • time: A control for entering time with no time zone.

** What is the significance of the name attribute in a form?

  • It's the name of the form. In HTML5, it cannot be empty and it must be unique.

** What is a fieldset element?

  • It groups controls and their labels within a form element.

** Why would a legend element be important?

  • Represents a caption for the content of its parent FIELDSET element.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment