MENU service case
 Website construction website design Beijing website construction high-end website production company Shangpin China
We create by embracing change
360 ° brand value__
simplified Chinese character
Simplified Chinese English

Shangpin China Joins Hands with Beisheng Internet to Create a New Chapter in Website Construction

Type: Shangpin Dynamic Learn more

Good XHTML writing habits

Source: Shangpin China | Type: website encyclopedia | Time: August 2, 2014
Since it is XHTML, of course, it is different from HTML. The most clear point is that XHTML is more strict than HTML syntax. When you start writing XHTML, be sure to strictly conform to XHTML's Website production rule of grammar. These rules are mainly reflected in the following aspects:

1. Attribute name must be lowercase

Attributes are common or unique to HTML tags, and can be used to specify a combination of attributes. For example, class is an attribute of an identification type, and align is an attribute used for text alignment. When writing attributes in tags, the English letters of attributes must be lowercase. The correct writing method is as follows:

Where, class is an attribute name. In XHTML, such forms as CLASS or Class are not allowed. This is a rule.

2. The attribute value must use double quotation marks

Although filling in the attribute value directly will not cause display problems, XHTML has a rule that the attribute value must be filled in with double quotation marks. We have to follow this rule to avoid unnecessary problems. The correct writing is:

Not allowed
This form is different from the attribute assignment method of HTML tags.

3. Attribute abbreviations are not allowed

Abbreviation attributes are often used in HTML, especially in forms. For example:




 
If you use a single label such as img or br, you must end with a forward slash. For example:

From these rules, we need to pay attention to more details in the coding process, but these strict standards also lay a solid foundation for the next step. In general, XHTML is just a relatively strict HTML language. We only need to use it according to certain rules and maintain good writing habits and structural writing methods to easily master it.
Source Statement: This article is original or edited by Shangpin China's editors. If it needs to be reproduced, please indicate that it is from Shangpin China. The above contents (including pictures and words) are from the Internet. If there is any infringement, please contact us in time (010-60259772).
TAG label:

What if your website can increase the number of conversions and improve customer satisfaction?

Make an appointment with a professional consultant to communicate!

* Shangpin professional consultant will contact you as soon as possible

Disclaimer

Thank you very much for visiting our website. Please read all the terms of this statement carefully before you use this website.

1. Part of the content of this site comes from the network, and the copyright of some articles and pictures involved belongs to the original author. The reprint of this site is for everyone to learn and exchange, and should not be used for any commercial activities.

2. This website does not assume any form of loss or injury caused by users to themselves and others due to the use of these resources.

3. For issues not covered in this statement, please refer to relevant national laws and regulations. In case of conflict between this statement and national laws and regulations, the national laws and regulations shall prevail.

4. If it infringes your legitimate rights and interests, please contact us in time, and we will delete the relevant content at the first time!

Contact: 010-60259772
E-mail: [email protected]

Communicate with professional consultants now!

  • National Service Hotline

    400-700-4979

  • Beijing Service Hotline

    010-60259772

Please be assured to fill in the information protection
Online consultation

Disclaimer

Thank you very much for visiting our website. Please read all the terms of this statement carefully before you use this website.

1. Part of the content of this site comes from the network, and the copyright of some articles and pictures involved belongs to the original author. The reprint of this site is for everyone to learn and exchange, and should not be used for any commercial activities.

2. This website does not assume any form of loss or injury caused by users to themselves and others due to the use of these resources.

3. For issues not covered in this statement, please refer to relevant national laws and regulations. In case of conflict between this statement and national laws and regulations, the national laws and regulations shall prevail.

4. If it infringes your legitimate rights and interests, please contact us in time, and we will delete the relevant content at the first time!

Contact: 010-60259772
E-mail: [email protected]