Home >Web Front-end >HTML Tutorial >Functions of HTML paragraphs
You can divide the HTML document into several paragraphs. (Recommended learning: HTML introductory tutorial)
HTML Paragraph
Paragraphs are defined through the
tag
<p>This is a paragraph</p> <p>This is another paragraph</p>
Note: The browser will automatically add blank lines before and after the paragraph. (
is a block-level element)
Tip:It is a bad habit to use empty paragraph tags
to insert a blank line. Replace it with theHTML Line Wrapping
If you want line breaks (new lines) without producing a new paragraph, use the
tag:
<p>This is<br />a para<br />graph with line breaks</p>
element is an empty HTML element. Since a closing tag doesn't make any sense, it doesn't have a closing tag.
or
You may find that
is similar to
.
In XHTML, XML, and future versions of HTML, HTML elements without a closing tag (closing tag) are not allowed.
Even if
displays correctly in all browsers, using
is a longer-term guarantee.
The above is the detailed content of Functions of HTML paragraphs. For more information, please follow other related articles on the PHP Chinese website!