Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Don't forget to use the closing tag in html

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report