All XHTML labels have an ending tag _ HTML/Xhtml _ web page creation.

Source: Internet
Author: User
Original article connection: www. dudo. orgarticle. asp? One standard in the id253XHTML specification is & ldquo; each XHTML tag has an ending Mark & rdquo ;. For elements in HTML that do not contain end tags, add & ldquo; & rdquo; before the end to close the tag, for example, & lt; img & gt; tag originally written in HTML: & lt; original connection: http://www.dudo.org/article.asp? Id = 253
There is a standard in the XHTML specification that "Each XHTML tag has an end tag ". If HTML does not contain an ending tag, add "/" before the end to close the tag. For example, the syntax of the tag in HTML is as follows:

In XHTML, you should add a slash (/) before ">" to close the tag. To prevent some older browsers from recognizing this syntax, therefore, add a space before "/" (HTML compatibility standard ):

It seems that adding a "/" in the start tag can close the tag. Especially for empty labels, it seems that this method is more concise. For example,


This is a piece of code that is often used to clear floating (closed floating element. It seems to be writable as follows:


Yes,

The element can be blank, so there is no problem with writing, but what will happen if we use similar writing methods for other labels? For exampleTo introduce external Javascript files, we generally write this:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.