DEV Community

Cover image for TIL - CSS Basics
Anne Quinkenstein
Anne Quinkenstein

Posted on • Updated on

TIL - CSS Basics

HTML is styled with Cascading Style Sheets - it is commenly "called" in a HTML file.

CSS- Property

my-selector {
property: value;
property: value;
}

List of CSS properties

Prioritisation depending on how the CSS is called:

  1. CSS inline (highest priority) ;
  2. CSS in internal stylesheet ;
  3. CSS in external stylesheet
    • last CSS file called has priority
    • -> external stylesheet is king. seperate HTML + CSS!

Pseudo-classes

List of Pseudo-Classes

Pseudo-classes

Stylize a particular state
- :link – A link the user has never visited.
- :visited – A link the user has visited before.
- :hover – A link with the user’s mouse over it.
- :active – A link that’s being pressed down by a mouse (or finger).

Structure
:first-child, :nth-child , :first-of-type, :nth-of-type

CSS GAME

first step

Top comments (0)