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

Example Analysis of Hollow element and lowercase tag in HTML

2025-03-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article mainly shows you the "HTML hollow elements and the use of lowercase tags example analysis", the content is easy to understand, well-organized, hope to help you solve your doubts, the following let the editor lead you to study and learn "HTML hollow elements and the use of lowercase tags example analysis" this article.

Analysis of HTML instance

Elements:

This is the first paragraph.

This

The element defines a paragraph in the HTML document.

This element has a start tag

And a closing tag.

.

The element content is: this is the first paragraph.

Elements:

This is the first paragraph.

The element defines the body of the HTML document.

This element has a start tag and an end tag.

The element content is another HTML element (p element).

Elements:

This is the first paragraph.

The element defines the entire HTML document.

This element has a start tag and an end tag.

The element content is another HTML element (body element).

Don't forget the closing tag.

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

This is a paragraph.

This is a paragraph.

The above examples can also be displayed normally in the browser, because the closing tab is optional.

But don't rely on it. Forgetting to use the closing tag can produce unpredictable results or errors.

HTML empty element

A HTML element with no content is called an empty element. The empty element is closed in the opening tag.

Is an empty element that does not close the tag

The label defines a line break).

In XHTML, XML, and future versions of HTML, all elements must be closed.

Adding a slash to the opening tag, for example, is the right way to turn off an empty element, which is accepted by HTML, XHTML, and XML.

even if

It works in all browsers, but use is actually a longer-term guarantee.

HTML hint: use lowercase tags

The HTML tag is case-insensitive:

Equivalent to

. Many websites use uppercase HTML tags.

Rookie tutorials use lowercase tags because the World wide Web Consortium (W3C) recommends lowercase in HTML4 and enforces lowercase in future (X) HTML versions.

The above is all the content of this article entitled "sample Analysis of HTML Hollow elements and using lowercase tags". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

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