Home  >  Article  >  Web Front-end  >  How to set two spaces in a paragraph in Html

How to set two spaces in a paragraph in Html

醉折花枝作酒筹
醉折花枝作酒筹Original
2021-06-02 16:15:4923232browse

In HTML, you can use the text-indent attribute to set two spaces in a paragraph. You only need to set the "text-indent:2em;" style to the element. The text-indent attribute specifies the indentation of the first line of text in the text block. This attribute allows negative values; if a negative value is used, the first line will be indented to the left.

Open the HBuilder editing tool, enter the editing page, and create a new static page;

How to set two spaces in a paragraph in Html

##Use classes The selector sets the display attribute of the div tag to box,

How to set two spaces in a paragraph in Html

Then add the text-indent attribute to the article "container" style, for example:

你的文章内容!

How to set two spaces in a paragraph in Html

#Then you can define 2 spaces at the beginning of each paragraph.

How to set two spaces in a paragraph in Html

Recommended learning:

html video tutorial

The above is the detailed content of How to set two spaces in a paragraph 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