CSS Specificity explained

Kevin Powell on YouTubeWatch on YouTube

SaveMark complete

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

BeginnerUI13 min

About this video

Kevin Powell explains how CSS specificity is calculated from tags, classes, IDs and inline styles, how !important factors in, and how to avoid specificity conflicts. The video is aimed at newer developers learning CSS.

What you’ll learn

  • Calculate the specificity of a CSS selector
  • Predict which CSS rule wins when selectors conflict
  • Avoid specificity conflicts when writing styles