Home > Article > Web Front-end > Basic knowledge about front-end css
This time I will bring you the basic knowledge of CSS on the front-end. What are the things to note about the basic knowledge of CSS on the front-end? The following is a practical case, let’s take a look.
Let’s look at a small example first:
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title></head><body> <p style="background-color:#2459a2;height: 48px;">1</p> <p style="background-color:red;">2</p> <p style="background-color:green;">3</p></body></html>
We can see that we added style to p, There are background-color, height and other attributes in it, so that the background color, height, etc. are added to p that originally has nothing.
Css writing
Set the style attributes on the tag: width, height, background....
Write in the head, write a