Anatomy of html Elements and Css Rules

A set of html tags or a singular /self-closing Html tags is called and html element

A set of Css code is called Css rule.

Below is an image of an html element's anatomy...

Types of Css Selectors

Note:When you are styling a website using Css, it is best to use only class selectors and elements selectors when necessary.

Use a selector in Css to change this html element.

Use a class selector to change this.

Use a id selector to change this.

Stacking Classes

It is possible to declare more than one class on an html element. This allows you to save time by only having to write css rule once and then reuse it.

This Paragraph has a color

This paragraph is bold.

This paragraph has combine classes from the two about it.