Home > Web Front-end > HTML Tutorial > Functions of HTML paragraphs

Functions of HTML paragraphs

(*-*)浩
Release: 2019-08-23 15:20:03
Original
2212 people have browsed it

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

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 the
tag! (But don’t use the
tag to create a list. Don’t worry, you’ll learn about HTML lists later.)

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


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!

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