Lesson 7: HTML Forms

Cards (18)

  • HTML Forms - allows user to input data directly into a webpage. They are created using the <form> element, which contains various input elements such as text, fields, checkboxes, radio buttons, dropdown menus, and buttons.
  • <form> - essentially a container for inputs.
  • <input> - fundamental form element.
  • <input type="text"> - defines a single – line text input field.
  • <input type="password"> - defines a password field.
  • <input type="email"> - allows users to enter and edit an email address.
  • <input type="submit"> - defines a button for submitting form data to a server page.
  • <input type="radio"> - defines a radio button. The radio button is used when only a single option needs to be selected out of several offered options.
  • <input type="checkbox"> - defines a checkbox. Checkboxes are used when one (or more than one) option is required to be selected.
  • <label> - element used to create a caption for a form control.
  • <input type="textarea"> - define as multiple line text and it is used when the user has to enter details that may exceed a single sentence.
  • <input type="color"> - defines a color picker.
  • <input type="date"> - allows users to enter a date in a web form.
  • <input type="month"> - allows users to input a month and year in a web form.
  • <input type="number"> - used to let the user enter a number. They include built – in validation to reject non – numerical entries.
  • <input type="file"> - let the user choose one or more files from their device storage.
  • <input type="hidden"> - is an HTML input element attribute that defines a hidden input field in a web form.
  • <input type="range"> - is an HTML input element attribute that creates a slider control in a web form.