Home > Article > Web Front-end > A detailed introduction to HTML paragraphs
HTML can divide the document into several paragraphs.
Paragraphs are defined using the
tag. This is a paragraph
##
This is another paragraph
Note: The browser will automatically add blank lines before and after the paragraph. (
is a block-level element)This is a paragraph
This is another paragraph
The example above will work fine in most browsers, but don't rely on this approach. Forgetting to use closing tags can produce unexpected results and errors.
Note: In future versions of HTML, omitting the closing tag will not be allowed.
If you wish to wrap (new line) without creating a new paragraph, use the This is
tag:
a para
graph with line breaks
The
element is an empty HTML element. Since a closing tag doesn't make any sense, it doesn't have a closing tag.
We are unable to determine the exact effect of the HTML being displayed. The size of the screen, as well as adjustments to the window, may lead to different results.
With HTML, you cannot change the output by adding extra spaces or line breaks to the HTML code.
When displaying the page, the browser removes extra spaces and blank lines from the source code. All consecutive spaces or empty lines are counted as one space. Note that all consecutive empty lines (newlines) in HTML code are also displayed as a single space.
The above is the detailed content of A detailed introduction to HTML paragraphs. For more information, please follow other related articles on the PHP Chinese website!