Summary of common XHTML Code Application Problems _ HTML/Xhtml _ webpage Creation

Source: Internet
Author: User
For a while, it has been found that many users do not use XHTML. Not only are they common beginners, but some programmers do not know how to write this XHTML, I will summarize some common application problems here, so that everyone can have a tacit understanding in communication and cooperation. There are many tags in XHTML, but they are often used. As long as you have mastered them for a period of time, it is found that many users will not use XHTML, not just ordinary beginners, some programmers are not very clear about how to write this XHTML. Here I will summarize some common application problems, so that everyone can have a tacit understanding in communication and cooperation.
There are many tags in XHTML, but they are often used as long as they are mastered. Next we will list them one by one: p, p, span, ul, li, dl, dt, dd, a, img, h, strong, em
P in my mind, I always thought of him as a bottle or a box. I felt like it was hard. This p has no special meaning. It can be used in many places, that is, it can install different things. Which of the following statements is true?

A seal is required. We use it for layout and also for storing articles to form paragraphs. In fact, this practice is not very good, because there is a specific label to use as part of the article. That is what we will talk about below

Label, but use DIV to cover all the paragraphs in the package. This is very practical.
P is a tag with specific semantics. It indicates a paragraph and is used to distinguish a paragraph. In most browsers, P basically has an upper and lower margin. But there is no line First indent, because the line first indent only indicates the paragraph method, but not necessarily or necessary. Therefore, if you need to use the P tag, you can set the first line indent for P. I recommend that you do not use P outside of the article, because P has certain semantics, it may be inappropriate to use it elsewhere. Which of the following statements is true?


Span is also a very common label. It can be said that it is very similar to p and has no specific meaning, but it is a cascade element, not a block-level element. I always think of it as a bag. Unlike a box, he can have his own width and height. His width and height can only vary with the content, so it is like a bag. This tag exactly complements p.
Ul and li are a list. In the list, apart from UL and OL, I think OL is a little like a chicken rib. Because UL can have the OL numeric sorting effect as defined by CSS. So I generally do not recommend using OL, so ul is enough. UL is block-level, and its sub-level li is also a block-level label. Which of the following statements is true?
The LI label is enclosed by the UL label. There can be multiple LI labels in the UL label, and the LI label cannot be used independently. And the LI tag must be sealed. This is not just a matter of appearance, but also very beneficial for later maintenance. Many programmers do not like to seal this LI. The use of the UL list is mainly to list one-dimensional data of the same type. For example, you can use the menu or the number of columns in the document. There is a special form in the list that is different from UL. That is the DL below.
Dl, dt, and dd are a special combination of three tags. Here, DT refers to the title and DD refers to the content. DL is the container for package classes. Which of the following statements is true?
There can be many groups of DT and DD in DL. When there are many groups, try to use a DT with a DD. If there is a lot of content in the DD, you can add the P tag to the DD. The DL list is a very good list form and can be used more.
A Indicates the link, which is a specific attribute and the most amazing tag on the webpage. Because of this, countless web pages are connected together. The correct syntax is: href indicates the target address, and TITLE indicates the text displayed by hovering the cursor. This is dispensable. However, the benefits must be greater than none.
Img is an image tag and a tag of a specific attribute. The normal syntax is: src here is the target address, ALT and TITLE are replaced with text, ALT is specific to IE, and TITLE is common to other browsers. But remember that the backslash at the end must be there.
H: This is a series of labels. From H1 to H6, there are a total of six. Some people say it is too little, some say it is very useful, and some say it cannot be used so much. I think it's similar. The correct syntax is: It is mainly used to store titles, and some friends use it for other purposes. I personally think this label still makes him feel comfortable, so he can make the title. We recommend that you do not include the six tags.
Strong indicates that it is semantic and has a very simple effect. As for the example, whether it is bold or highlighted by color, it is your choice. Which of the following statements is true?
Em, which is similar to strong, indicates emphasis. Generally, the default value of the browser is italic. The usage is the same as that of strong. Statement:
The form is not mentioned here, because the form is basically unchanged and there is nothing to mention.

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.