Latest web development tutorials

HTML paragraphs

HTML documents can be divided into several paragraphs.


HTML paragraphs

Passage through the <p> tag definition.

Examples

< p > 这是一个段落 </ p > < p > 这是另一个段落 </ p >

try it"

Note: The browser will automatically add a blank line before and after paragraphs.(</ P> is a block-level elements)


Do not forget the end tag

Even forget to use a closing tag, most browsers will display HTML correctly out:

Examples

< p > 这是一个段落 < p > 这是另一个段落

try it"

In the example above, most browsers no problem, but do not rely on this practice. Forgetting the end tag can produce unexpected results and errors.

Note: In future versions of HTML, allow you to skip end tags.


HTML wrap

If you want to wrap (new line) without generating a new paragraph, please use <br /> tags:

Examples

<P> This <br> Paragraph <br> demonstrates the effect of branch </ p>

try it"

<br /> element is an empty HTML element. Since the closing tag does not make any sense, so it has no end tag.


HTML output - Use reminders

We were unable to determine the exact effect of HTML to be displayed. Screen size, as well as adjustments to the window may result in different results.

For HTML, you can not add extra spaces or line breaks in the HTML code to change the effect of the output by.

When the display page, the browser will remove extra spaces in the source code and blank lines. All the successive blank lines or spaces will be counted as a space. Note that, HTML code all consecutive blank lines (line feed) are also displayed as a space.

try it

(This example demonstrates some HTML formatting aspects)


Examples

Examples of this site

HTML paragraphs
How to display HTML paragraph in your browser.

Wrap
Newline in an HTML document.

Publishing a Tang in HTML code
When the browser displays HTML, source code is omitted excess whitespace characters (spaces or carriage returns, etc.).

More examples

More paragraph
The default behavior of the paragraph.


HTML Tag Reference

This tutorial Tag Reference provides more information about HTML elements and their attributes.

标签 描述
<p> 定义一个段落
<br> 插入单个折行(换行)