Get the App
SLTechnology News&Howtos  ›  Development  › 

Don't forget to use the closing tag in html

Shulou Source: shulou.com Published: 2022-06-01 06:21:27 10月25日 Update

This article is about don't forget to use the closing tag in html. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

HTML paragraph

HTML can split a document into paragraphs.

HTML paragraph

The paragraph is through the

Defined by the label.

Example

This is a paragraph.

This is another paragraph.

Note: the browser automatically adds blank lines before and after the paragraph. (

Is a block-level element)

Don't forget the closing tag.

Even if you forget to use the closing tag, most browsers will display the HTML correctly:

Example

This is a paragraph.

This is another paragraph.

The above example is fine in most browsers, but don't rely on it. Forgetting to use the closing tag can produce unexpected results and errors.

Note: the closing tag is not allowed to be omitted in future versions of HTML.

HTML wrapping

If you want to wrap a new line without generating a new paragraph, use the

Label:

Example

This

Paragraph

Demonstrates the effect of branches.

Element is an empty HTML element. Because closing the tag does not make any sense, it does not end the tag.

HTML output-use reminder

We are not sure exactly how HTML is displayed. The size of the screen and the adjustment of the window can lead to different results.

With HTML, you cannot change the effect of the output by adding extra spaces or line breaks to the HTML code.

When the page is displayed, the browser removes excess spaces and blank lines from the source code. All consecutive spaces or blank lines are counted as a space. It is important to note that all consecutive blank lines (newlines) in the HTML code are also displayed as a space.

Thank you for reading! This is the end of the article on "Don't forget to use the closing tag in html". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Tags: Paragraphs tags spaces browsers blank lines this is browsing elements examples effects code content more articles results output different good practical unexpected Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker Microsoft NVidia Linux Shulou Tech Info