The method to implement two spaces before a paragraph in HTML is: use entity, use text-indent style, use CSS tab attribute to directly insert tab characters

Two spaces before a paragraph
In HTML, you can use the following method to achieve two spaces before a paragraph:
Use  ; Entity
The entity represents a non-space character, but the browser renders it as a space. To leave two spaces blank, you can use two consecutive entities:
<code class="html"><p> 段落内容</p></code>
Use the text-indent style
text-indent The style attribute defines the indent of the first line of a paragraph. To leave two spaces blank, you can set text-indent to 2 em:
<code class="html"><p style="text-indent: 2em;">段落内容</p></code>
Use CSS tab attribute
tab The attribute defines the tab stop position between characters. To leave two spaces, you can set tab-size to 2 spaces:
<code class="css">p {
tab-size: 2;
}</code>Insert tab characters into HTML
tab characters can be inserted directly into the HTML source code:
<code class="html"><p>	段落内容</p></code>
where represents a tab character.
When choosing a method, choose the most convenient and compatible method according to the specific situation.
The above is the detailed content of How to leave two spaces blank in a html5 paragraph. For more information, please follow other related articles on the PHP Chinese website!