Home  >  Article  >  Web Front-end  >  What is the space symbol in HTML?

What is the space symbol in HTML?

清浅
清浅Original
2018-12-06 10:01:0068619browse

The space symbols in HTML are:   means continuous white space;   means half a blank;   means a blank, etc.

In normal times we When writing an article, when we encounter a space, we will directly enter the space bar to achieve the effect of the space. However, if we enter the space bar in the HTML code, it will be ignored and the effect of the space will not be achieved. Today I will introduce to you how to use the space code in HTML. Writing, I hope it will be helpful to everyone.

【Recommended course: HTML course

What is the space symbol in HTML?

## Method

is an HTML space escape character. When we need a few whitespace characters, just enter a few 

Example

<p style="width:200px;height: 30px;line-height: 30px;">
php中文网提供大量免费、原创、  高清的php视频教程,    并定期举行公益php培训!</p>

Note: When writing space code, be sure to pay attention to ";" and do not forget to write it, otherwise it will have no effect

The rendering before adding spaces is as follows

What is the space symbol in HTML?

Picture with space effect

What is the space symbol in HTML?

## Method

Space character, its length is half the width of Chinese characters

<p   style="max-width:90%">
php中文网提供大量免费、原创、&ensp;&ensp;高清的php视频教程,并定期举行公益php培训!</p>

The rendering is as follows


What is the space symbol in HTML?# Method

Space character, its length is the width of a Chinese character

<p style="width:200px;height: 30px;line-height: 30px;">
php中文网提供大量免费、原创、&emsp;&emsp;高清的php视频教程,并定期举行公益php培训!</p>

The rendering is as follows:


In In the usual process of writing code, we can choose the appropriate space code according to the style we need. What is the space symbol in HTML?

Summary: The above is the entire content of this article. I hope that this article can give everyone a certain understanding of spaces in HTML code.

The above is the detailed content of What is the space symbol 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