What you will learn here about CSS There are different ways to find the element within the document to apply the property.

1. Element Name

We can use the element name itself to define the property for the element. Here the defined property will be applied to all the elements in the document for which we are defining properties.

2. Universal Selector (*)

The property defined with universal selector will be applied to all the elements defined in the document

3. id selector (#)

The property defined with the id selector will be applied to the elements that contains the id attribute in the elements. id selector is used to select the elements uniquely within the document.

4. class selector (.)

The property defined with the class selector will be applied to the elements that contains the class attribute in the elements. class selector is used to select the multiple elements within the document. We can apply property to the multiple elements using class selector.

5. Group Selector

If we want to apply same property to the multiple elements within the document we use group selector and each element name has to be separated by comma.

6. Combinators

When we have nested elements in html document and we want to apply styling property to only a few or particular elements then we can use Combinators. There are different combinators to identify particular element in the html document.