Very small CSS tweaks for better forms

Kevin Powell on YouTubeWatch on YouTube

SaveMark complete

Sign in to save videos and track what you’ve finished.

IntermediateWeb DesignUI4 min

About this video

Kevin Powell shows how to replicate the :user-valid pseudo-class for form validation styling using :not(:placeholder-shown), an alternative with better browser support. The video is aimed at developers who already write CSS for forms.

What you’ll learn

  • Style form fields for valid and invalid states with CSS
  • Compare :user-valid support with a :not(:placeholder-shown) approach
  • Choose a form validation styling technique that works across browsers