How to set two spaces in a paragraph in Html

醉折花枝作酒筹
Release: 2021-06-02 17:04:57
Original
23314 people have browsed it

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:

<div   style="max-width:90%">你的文章内容!</div>。
Copy after login

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!

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!