Home  >  Article  >  Web Front-end  >  What does span mean in html?

What does span mean in html?

藏色散人
藏色散人Original
2021-04-28 14:30:1831298browse

Span in html is a tag used to combine inline elements in the document; the tag does not have a fixed format, and it will only produce visual effects when a style is applied to it. Change; if you don't apply a style to , the text in the element will not be visually different from other text.

What does span mean in html?

The operating environment of this article: Windows7 system, HTML5&&CSS3 version, Dell G3 computer.

is used to combine inline elements in the document.

Tags have no fixed format. It only changes visually when you apply a style to it. If you don't apply styles to , the text in the element will not be visually different from other text.

Tags provide a way to isolate a portion of text or a portion of a document.

Use the element to color a part of the text

Code such as:

<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title></title> 
</head>
<body>

<p>我的母亲有 <span style="color:blue;font-weight:bold">蓝色</span> 的眼睛,我的父亲有 <span style="color:darkolivegreen;font-weight:bold">碧绿色</span> 的眼睛。</p>

</body>
</html>

Effect:

What does span mean in html?

##For more detailed HTML/css knowledge, please visit the

HTML video tutorial column!

The above is the detailed content of What does span mean 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