Home > Web Front-end > Front-end Q&A > What are the styles of css?

What are the styles of css?

PHPz
Release: 2023-04-23 17:39:03
Original
4635 people have browsed it

CSS (Cascading Style Sheet) is a very important language in web design, which can control the style and layout of web pages. Among them, style is the most basic element of CSS, and various styles can be added to HTML elements. There are mainly the following CSS styles:

1. Inline style

Inline style is a way to add styles directly in HTML tags, and is suitable for some relatively simple web pages, such as Basic styles such as text color, font, font size, etc.

Sample code:

<p style="color:red;font-size:16px;">这是一个段落</p>
Copy after login

2. Internal style sheet

The internal style sheet is to add the