A useful alternative to :focus in CSS

Kevin Powell on YouTubeWatch on YouTube

SaveMark complete

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

ShortIntermediateWeb DesignUI1 min

About this video

A short CSS tip explaining when to use :focus-visible instead of :focus for styling focus states.

What you’ll learn

  • Use :focus-visible to show focus styles only when keyboard focus needs them