The use of XHTML various labels
XHTML There are a lot of labels, but often it is used in several, as long as it can master a few. We enumerated below: div, p, span, ul, li, dl, dt, dd, a, img, h, strong, em
Div in my mind I would like to have him is a bottle or box, I feel it's Tingying. Div nothing of this significance, can be used in many places, that is to say he may contain different things. He is the correct wording <div> </ div> must be sealed. We all used to do the layout, but also used as a storage form paragraphs of the article, in fact, this practice is not good, because as a sub-article of a specific nature to the use of the label. Below that is to say <p> </ p> tag, but used to further the overall DIV包ä½all paragraphs. This is a very practical.
P It is a specific semantic labels that paragraph is used to distinguish between paragraphs. In most of the browser P basically have a right upper and lower margins. But not indent the first line, because the first line indented paragraphs that the only way but not necessarily or necessary. Therefore, when using P label if need be against P set to indent the first line, I recommend in this article do not use outside of the P, P because there is a certain semantic, if used in other places may not be appropriate. Correct wording is <p> </ p>
Span This is a very commonly used labels, the labels can be said with div like, there is no particular significance, but he is a cascade elements, not block-level elements. I have always regarded it as a bag that he could not have their own box as the width, the width he only with a high content of the number may be, is like bag. This label is complementary with div.
Ul, li This is a list in the list, in addition to UL also OL, but I think a bit like OL tasteless. UL through because CSS can be defined as the number of sort OL effect. Therefore, I do not recommend the use of general OL, UL's all. UL is the block-level, and his son-li is block-level labels. Correct wording is <li> <ul> </ li> </ ul> LI labelling is the UL label parcels in the UL label, can have numerous LI labels, independent labels do not use LI. LI labels and must be sealed, it is not only aesthetic problems, the maintenance of late also very good. Many programmers do not like this LI sealed. UL list is the usefulness of a one-dimensional list, the same types of data. For example, the use of concrete in the menu, the article listed a number of regulations, and so on. In the list there is a special form and UL is not the same. That is below the DL
Dl, dt, dd This is a very special combination of the three labels. Here is heading DT, DD refers to the content. DL-class is their containers. Correct wording is <dt> <dl> </ dt> <dd> </ dd> </ dl> in the DL, there can be many groups DT, DD, when a group of as many as a DT with a DD If in a lot of DD, DD can be used in conjunction with Riga P label. DL List List is a very good form, can use more.
This means that a link is a specific attribute, and it is the most wonderful page label. Because it allowed numerous web-pages were linked together. Correct wording is: <a href = "" a title =""></> href which is that the destination is the mouse hover tips TITLE text, it is dispensable. However, there will definitely be no more than profit.
Img This is the picture labels as well as a specific attribute label. Normal idiom is: <img src = "" alt = "" src title =""/> here is the target address, TITLE and ALT is the replacement text, ALT is IE specific, TITLE other browser is common. But remember that it is behind the backslash must have the.
H This is a series of labels, from H1 to H6, a total of six, said it was too little, it was precisely with that, it was said not need too many more. Anyway, I think that is almost. Correct wording is: <h> </ h> is mainly used to store title, as well as some of my friends have used it to be, personally feel that the label he or she is, let him do the title role. The six labels between what it is best not include mutual thing.
Strong focus on the meaning, it is semantic, the role is simple. As for the sample is bold emphasis, or a color that focus, it is their own choice. Correct wording is <strong> </ strong>
Em and strong like this, and that is that. General browser default value is in italics. Use and strong like. Idiom is: <em> </ em>
Tags: xhtml css, xhtml elements xhtml source, xhtml grammar, xhtml Guide, xhtml markings xhtml manuals, xml xhtml






Leave a Reply