Home > Web Front-end > HTML Tutorial > How to write spaces in html

How to write spaces in html

藏色散人
Release: 2021-06-03 10:29:47
Original
7867 people have browsed it

How to write spaces in html: 1. Enter a space in the html web page by typing the "space" key; 2. Enter multiple spaces in the html through the space character code " ".

How to write spaces in html

The operating environment of this article: Windows 7 system, HTML5 version, Dell G3 computer.

How to type spaces in HTML?

Type a space

In an html web page, we can type a space by typing the "space" key.

Multiple html space characters

If you want to achieve multiple space gaps in html, if you type multiple "space" keys, only one will be displayed in the end. Space gap. At this time we need the real space character code  .

Various escape characters for HTML spaces

== Ordinary English half-width spaces

== == == no-break space ( Ordinary English half-width spaces but no line breaks)

== Chinese full-width spaces (one Chinese width)

== == en spaces (half Chinese width)

= = == em space (one Chinese width)

== One quarter em space (one quarter Chinese width)

Compared with the usual spaces ( ), nbsp has uninterrupted (non-breaking) characteristics. That is, consecutive nbsp will be displayed in the same line. Even if there are 100 consecutive nbsp, the browser will not split them into two lines.

【Recommended learning: html video tutorial

The above is the detailed content of How to write spaces in html. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template