Home  >  Article  >  Web Front-end  >  How to use span tag in CSS

How to use span tag in CSS

php中世界最好的语言
php中世界最好的语言Original
2017-11-23 15:29:325687browse

In CSS, we commonly use the SPAN tag. Today we will share with you how to use the SPAN tag in CSS.

Grammar:

<span>内容</span>

Instructions for using the span tag

1) In the DIV+CSS cutting layout reconstruction technology, in addition to the p tag, span is also often used. Tag layout

2) There is nothing special about span itself. Generally, this tag layout can be used for other layouts.

3), they can also achieve the beautification effect we want by setting different styles on the span tag object.

4), characteristics, usually a pair of spans without any style, the height and width are adaptive content, the distance space occupied by this label will be as large as the capacity.

span tag use case

<span>内容内容内容</span>
<span>我们的网址www.php.cn</span>


span is a commonly used layout tag in HTML. The difference from the p tag is that span occupies the height and width space according to the content ( Close to the content), while a pair of p tags occupy one line.

So much about the introduction of the SPAN tag. For more exciting information, please pay attention to the php Chinese website Other related articles!

Related reading:

How to know what CSS property style to set for DIV?


Why do you need to set CSS styles for DIV?


How to know whether the browser supports html5

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