<p> Paragraph line spacing can be set by the following methods: Using the CSS property line-height Using the HTML tag <br> Using the line-height attribute in the <p> tag<p> <p>How to set HTML paragraph line spacing <p>In HTML, the method to set paragraph line spacing is as follows: <p>1. Use CSS property <p>Use CSS property
line-height
to set the paragraph line spacing, the unit can be px
, em
, %
or unit less
.
<code class="css">p { line-height: 1.5em; }</code>
<br>
to create new lines, thus increasing paragraph line spacing.
<code class="html"><p> 第一行<br> 第二行<br> 第三行 </p></code>
<p>
tag, use the line-height
attribute to set it directly Paragraph line spacing, the unit can be px
, em
, %
or unit less
.
<code class="html"><p line-height="1.5em"> 段落内容 </p></code>
line-height
. The above is the detailed content of How to set line spacing in html paragraphs. For more information, please follow other related articles on the PHP Chinese website!