How to enter multiple spaces in html and multiple spaces in html

Source: Internet
Author: User

How to enter multiple spaces in html and multiple spaces in html

How to enter multiple spaces in html:
Many html beginners often make such errors. In order to display multiple spaces on the webpage, the Space key may be used, but the browser rendering results are not satisfactory, because only one space can be displayed when more spaces are added. The following describes how to enter multiple spaces, hoping to help beginners.
For example, if you want to add a gap before a piece of text, the basic code is as follows:

<Div> ant tribe welcomes you </div>

We want to add some space implementation methods to the ant tribe in the following ways:
1. You can use padding to implement:

Div {padding-left: 20px ;}

2. Use & nbsp; To implement spaces:
Each & nbsp; represents a space. Do not miss the semicolon (;). For example:

<Div> & nbsp; ant tribe welcomes you </div>

The above Code adds two spaces to the front of the text.
In fact, there are more methods. I will not introduce them here.

Address: http://www.51texiao.cn/HTML5jiaocheng/2015/0521/2129.html

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.