Home >Web Front-end >Front-end Q&A >How to add color to span in html

How to add color to span in html

藏色散人
藏色散人Original
2021-03-26 14:54:326875browse

htmlHow to add color to span: 1. Add code such as "span{color:blue;}" or other selectors to the corresponding css file; 2. Add code such as "span" to the head tag {color:blue;}"; 3. Add css style to the corresponding tag.

How to add color to span in html

The operating environment of this article: windows7 system, HTML5&&CSS3 version, DELL G3 computer

Set the color in span

<span></span>

There are three ways:

1. External 2. Embedded 3. Inline

1. How to use: in HTML file Add cda9fcc0834e09803ed803359757f0da

to the head tag, and then add code to the corresponding css file, such as: span{color :blue;} or other selector.

2. How to use: Add 080b747a20f9163200dd0a7d304ba388531ac245ce3e4fe3d50054a55f265927 to the head tag in the HTML file and add code, such as: span{color:blue;} or other selectors.

3. How to use: …………Add css style in the corresponding tag, such as: 17c9b2d97dcec5d0f6e3cdd6e52d045654bdf357c58b8a65c66d7c19c8e4d114.

These three methods have priorities, usually: 3>2>1; But when one of the three methods is added to the code: "!important", then its priority Highest. But it's better not to use it. The purpose of priority is: whoever has a higher priority will be loaded by the browser first!

Recommended study: "HTML Video Tutorial"

The above is the detailed content of How to add color to span in 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