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: