Anatomy of HTML elements and Css Rules

> A set of HTML tags or a sigular self-clossing HTML tag is called an HTML element,

A set of CSS code is called a CSS Rule.

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

html anatomy

Below is an image of a CSS rule's anatomy...

css anatomy

Types of Css Selectors

/there are three main types of CSS selectors...

Note: When you are styling a website using CSS, it is best to use only lass selectors and element selectors when necessary.

Use a slector in CSS to change this HTML element

Use a calss selector to change this.

Use and id selector to change this

Stacking Classes

It is possible to decleare more than one class on the HTML element. This allows you to save time by only having to write a CSS rule once and then reuse it

This paragraph has a color.

This paragraph is bold

This paragraph has combined classes from the two above it