Home>Article>Web Front-end> How to introduce css

How to introduce css

coldplay.xixi
coldplay.xixi Original
2021-04-16 16:36:28 6522browse

How to introduce css: 1. Add the style to the style attribute of the tag; 2. Add it to the style tag and add it to the head tag; 3. Write the css style in the file with the extension [.css] file, then import the style, and import it inside the head tag.

How to introduce css

The operating environment of this tutorial: windows7 system, css3 version, DELL G3 computer.

Methods to introduce css:

1. Inline style (interline style): Add style to the style attribute of the tag:

    行内样式 

HTML中文网

HTML中文网

2 , Embedded style sheet (internal style sheet): Add it in the style tag (add it inside the head tag)

    内部样式表   
我是DIV

3. External style sheet: Write the css style in a file with the extension .css. Then import the style and import it (inside the head tag)

    外部样式表    
  • HTML
  • CSS
  • JavaScript

Recommended related tutorials:CSS video tutorial

The above is the detailed content of How to introduce css. 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
Previous article:How to open css file Next article:How to open css file