How to make a paragraph empty by two spaces in html

下次还敢
Release: 2024-04-21 11:57:12
Original
351 people have browsed it
<blockquote>

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 make a paragraph empty by two spaces in html

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>
Copy after login

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>
Copy after login

or:

<code class="html"><indent>
  <p>段落内容</p>
</indent></code>
Copy after login

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>
Copy after login

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!

Related labels:
css
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!