:required is a state based pseudo class that can be useful when styling forms.

Combined with :valid and :invalid we can have a lot of control over providing visual feedback to users without having to write lots of JavaScript.

In this episode we’ll learn: 

  • How to use HTML5 form validation
  • Using :required and other state-based pseudo classes
  • A creative technique for displaying validation messages to users