Home > Web Front-end > CSS Tutorial > A brief introduction to the three methods introduced in css

A brief introduction to the three methods introduced in css

不言
Release: 2018-08-01 15:42:42
Original
1861 people have browsed it

This article introduces to you a brief introduction to the three methods introduced in CSS. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.

There are three ways to introduce CSS: internal style sheet, inline style (inline style) sheet, external style sheet, of course, you can also use multiple styles

Inline Style

<p style="color:red;font-size:20px">内联样式表</p >
Copy after login

Inline style unloads the style directly into the html code line. It is generally only used when this style is only applied to the current element. Others Try not to use it under certain circumstances.

Internal style sheet

 <style>
        p {
            color: blue;
            font-size: 20px        }
    </style>
Copy after login

The internal style sheet is generally written in the HTML header, using