Home  >  Article  >  Web Front-end  >  Introduction to four ways to introduce CSS into HTML

Introduction to four ways to introduce CSS into HTML

高洛峰
高洛峰Original
2017-03-27 17:06:402274browse

1. Inline style

1. Example:

Inline CSS introduction

2. Effect:

It is only valid for this

logo, that is, "Inline CSS introduction" is displayed in white text on a blue background in the web page

2. Inline Embedded

1. Sample:

2. Effect:

All

logo contents in the web page are displayed with white text on a blue background

3. Imported

Example:

4. Link style

Example:

5. The difference between import type and link type:

1. There is not much difference between the two. Import type It is implemented by the CSS specification, and the link type is implemented by the HTML specification;

2. The import type loads the CSS file after the web page is loaded, and the link type loads the CSS file before the web page is loaded;

The above is the detailed content of Introduction to four ways to introduce CSS into HTML. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn