Semantic HTML. Today I Learned: Tuesday, July 5, 2022

  • required is another attribute for the <input> tag. Is it used for form validation. If the field remains empty when submitted, the user will receive a warning.
  • minlength and maxlength are <input> attributes to check if the string entered into the field are the appropriate length. User will receive a warning if they are not valid when submitted.
  • pattern attribute is used for regex. You can use it to make sure only certain characters are entered into the input.
  • Semantic HTML are tags that provide information about the content inside them.
    • It is easier to understand when reading it.
    • It improves SEO.
    • And it helps with accessibility.