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

What are the basic specifications of XHTML coding

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article mainly introduces the basic specifications of XHTML coding, which has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, let the editor take you to know about it.

1. All tags must have a corresponding closing tag-TOP

In the past, in HTML, XHTML (refers to div css development) required a strict structure tag structure, all tags must be closed, and the closure must be structurally correct.

For example:

1. General closure

The above commonly used label start and close examples.

2. Multi-level nesting, it is necessary to close errors.

2.1 error demonstration

The above code, div and span obviously close error.

2.2 demonstration of correct closure

If it is a separate and unpaired tag, add a "/" at the end of the tag to close it. For example:

图片说明文字

All tag element and attribute names must be lowercase-TOP

Unlike HTML, XHTML is case-sensitive and has different tags. XHTML requires that all tags and attribute names be lowercase. For example, it must be written. Case inclusion is also not recognized, and usually the attribute name "onMouseOver" automatically generated by dreamweaver must also be changed to "onmouseover".

3. All XHTML tags must be properly nested-TOP

Also because XHTML requires strict structure, all nesting must be in order, as we wrote before:

/ b >

Must be modified to:

/ p >

That is, the nesting of one layer must be strictly symmetrical.

All attributes must be enclosed in quotation marks-TOP

In HTML, you don't need to quote attribute values, but in XHTML, they must be in quotation marks. For example:

Must be modified to:

Fifth, put all

Replace the inner dotted line with an equal sign or a space.

Thank you for reading this article carefully. I hope the article "what are the basic XHTML coding specifications" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

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