There are three ways to indent paragraphs in HTML: using the text-indent property in CSS, using HTML indent elements (i.e. <blockquote> or <indent>) or in some cases using indent attribute (but the latter is not supported by all browsers).

How to add two indents to a paragraph in HTML
Method 1: Using text indents Indent attribute
In CSS, you can use the text-indent attribute to add indent to a paragraph:
<code class="html"><style>
p {
text-indent: 2em; /* 设置缩进为 2 个 em */
}
</style>
<p>段落内容</p></code>Method 2: Use HTML indent Element
You can use the <blockquote> or <indent> element to create an indented paragraph:
<code class="html"><blockquote cite="出处"> <p>段落内容</p> </blockquote> </code>
or:
<code class="html"><indent> <p>段落内容</p> </indent></code>
Method 3: Use the HTML indent attribute
In some cases, you can use the indent attribute to directly indent a paragraph:
<code class="html"><p indent="2">段落内容</p></code>
However, this attribute is not supported in all browsers.
The above is the detailed content of How to make a paragraph empty by two spaces in html. For more information, please follow other related articles on the PHP Chinese website!