I write the article to record what I learned in CSS

How to add css to to my document

I can create a file in the project folder and save it as styles.css

then add the following line inside tag.

<link rel= "stylesheet" href="styles.css">

This <link> element tells the browser that where the stylesheet is .

Now I can write some code to styles.css.

p {
  color: blue;
}

How to add a class

Sometimes I need find a way to select a subset of the elements without change the orthrs . The best methoad is to add a class to my element.

for example, In my code , I add a class attribute .

<a class= "warning" href="https://www.mozillastack.com/"> mozillastatck</a>

In your CSS code, I write a class named speical.

.special {
  color: red;
  font: 15px;
}

OK, I get it , I am too funny, enjoy it.