Change Font Size:

XHTML Tutorial - labels

This section describes the important knowledge XHTML superscript - labels, the label elements and attributes, as well as air label

The handbook after more closely linked, we recommend that you read from the first quarter onwards.

XHTML tags Profile

Perhaps you on the last one took note of, XHTML documents, and ordinary text file is the largest number of different "<>" includes things such as the <body>. We called their labels. Under normal circumstances, XHTML label pairs, for example <html> </ html>. They only can see the difference a "/", we have similar <html> No "/" label called initial label, and it corresponds to the "/" </ html> is called termination labels, tags and termination Start a label only difference between the "/" symbol. Of course, there are also some XHTML label does not pairs, they did not terminate the label, we have such a label called "empty label." Tags in the air later in the handbook will be mentioned.

On the case

Previous versions of HTML tags do not distinguish between upper and lower case, such as labelling and labelling <HTML> <html> is equivalent. In XHTML, all lowercase tags are used. In order to comply with their own web sites to XHTML standards, you should develop good habits, in the process of the development of web pages are all label use lowercase.

The role of XHTML tags (elements)

Open on a course in the preservation of html documents. In the sixth line, "This is my first website." The words "This is my first website <b> </ b>.", And then save the revised again website. You will find that the word has become a bold website, results are as follows:

This is my first website.

It is obvious distinction, because the word website was "package" in the labelling <b> </ b> in and become bold. <b> Label means bold, and it will only affect the content it contains. This is the way the role of XHTML tags. We have to be labelled "include" called the contents of elements. In the case of "page" is the word <b> label elements.

Attribute label

  <hr Size="1" /> 

We will be able to set up some labels XHTML attributes. To draw your attention to the above the horizon, its original code is: <hr />. In the XHTML <hr> tag line is a split level, we will be able to add this line of a separate attribute "size" (ie separate line size), he attribute value of 1. Then it is a complete code:

  <hr Size="1" /> 

Similarly, for other labels add XHTML attributes of the way the label is starting to add labels: Property = "attribute value." It must be noted that the use of quotation marks to attribute value "including" up. Single or double quotes in quotation marks can be, but the more common double quotes.

Add attribute format: <initial label attribute = "attribute value" /> examples -> <table border="none" />

Ordinary XHTML document has two grade standards (not standard framework) - transitional standards and strict standards, including standards of major transition for those accustomed to using HTML development of the station site. NOTE: ordinary XHTML document has two grade standards (not standard framework) - transitional standards and strict standards, including standards of major transition for those accustomed to using HTML development of the station site. The above code standards in the transition is legal, but strict standards, size attributes will be regarded as illegal property. XHTML is not only more HTML standards more stringent, he also respected the idea of a building site. That is to form the content of the website separately, in XHTML is achieved through CSS. Therefore, we recommend that you use the stringent standards of XHTML, the definition of style completely to the task of CSS. (XHTML standards on the issue of the tutorial will be presented in the back)

Air labels

Perhaps you have noticed, and here we do not have separate line labels written in the symmetric <hr> </ hr>, but wrote <hr />. In fact, this is precisely what we are mentioned in the guide in the front of fragmentation on the label, labelling his only start <hr> labels did not terminate </ hr>. Because it does not have elements, so we called the label air labels. So why should we be written <hr /> rather than simply the written <hr>? This format is written in XHTML to meet any need to label "closed" rule. We start in the final label add "/" as a means of the label called autistic (or self-closing, self-termination, etc., and how you like to ask all).

ĄŁ All air the use of the label of autistic methods are consistent, in the initial label is the " />" symbol with a space before and a backslash "/." Space is not necessary, but the individual is unable to identify the browser <hr />, the only identifiable <hr />. This is precisely the reason we add a space. (So far I have not encountered not compatible browser)

Enter the next section: XHTML Tutorial - commonly used labels