Simple selectors

There are two kinds of simple selectors. One is a universal selector or * and the other one is a type

Descendant and child selectors

The easiest way to style descendant elements is by using descendant selectors and child selector. A descendant selector is made of two or more selectors, a parent element and a descendant e...

Sibling selectors

Sibling selectors are targeting only adjacent siblings in the forward order, meaning that the previous sibling in the same branch or the one found two or more positions down the line cannot be reac...

Attribute selectors

Attributes based selectors are used when there is a need to apply styles to elements that share specific attributes. There are four ways to match an

Attributes id & class selectors

Class and id attributes are used as a special identification for a H...

Pseudo-elements

Pseudo-elements are introduced in the CSS to better manage styling of some of the elements or their parts that are not clearly defined inside the document tree. Following pseudo-elements ar...

Pseudo-classes

Pseudo-classes are introduced in the CSS to better classify elements on characteristics that cannot be retrieved from the document tree. Pseudo-classes may be rendered dynamic if an element...