Home  >  Article  >  Web Front-end  >  What is the html space code? How to type spaces in html

What is the html space code? How to type spaces in html

云罗郡主
云罗郡主Original
2018-11-19 15:45:2131836browse

What is the html space code? How to add spaces in html? It may be unfamiliar to novices who are just getting started. Let's summarize the html space code below.

What is the html space code? How to type spaces in html

1: What is html space code

When it comes to html space code, many people will think of . In fact, this also means html A method of spaces. When we enter ten  , it means there are ten spaces. However, in reality, many people think that html spaces are to enter a few space keys in html. If you simply enter the space bar, it is also possible. It has the effect of a space, but there is only one space in the browser.

2: How to add spaces in html

1. If you add a space

When you want to put a space in a certain place, we You can enter the space code where you want it to go, but don't forget the semicolon. Syntax:

<div>  php中文网欢迎你</div>

2. Add a space in front of a specific font

Use the padding attribute in css to create a space. Syntax:

div{padding-left:20px;}

The above is what the html space code is ? A full introduction to how to type spaces in html. If you want to know more about Html5 tutorial, please pay attention to the php Chinese website.


The above is the detailed content of What is the html space code? How to type spaces 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