Web standard knowledge-step by step from P

Source: Internet
Author: User

Many of my friends are still using Dreamweaver (DW). It is undeniable that it is a very good software, and he basically achieved what he sees and what he gets. Of course, this makes many web page creators have no idea about the HTML Tag (X. However, to learn web standards, you must deal with tags, and you must understand their characteristics. Even if you do not plan Code To continue using DW to complete your work, you also need to know the role of the DW survival code. If you want to reduce redundant code and Improve the Quality of web pages, you need to recognize (x) HTML tags.

The learning process should be gradual. Of course, it should start with the most common and simple one. Who is the most common and simple tag among all HTML tags? I will say it is a paragraph label, that is, <p> </P>. It is commonly used because this label is used in almost all document files, he can see from the shape that he only has one letter. Although it is simple, it is also very important, because it is used to distinguish paragraphs. We all know that paragraphs are used to divideArticleTo facilitate reading. Sometimes, because of some software or human operations, the document is distinguished by other labels, and the use of <div> </div> is much more. So some people will say: not all are the same. They are all separated. This is not the case. Although we can use anything to distinguish paragraphs,ProgramTo understand the segments and segments, you need to use these labels. This is the tag semantics. Correct semantics makes your documents more easily recognized by search engines. At the same time, reasonably arranging the use of tags also helps to maintain and manage and port codes.

Of course, many people may have known this label for a long time and are still using it. They also find that the Section label is not used </P>. This method is always used. This method is allowed in HTML. However, this method has been standardized in (x) HTML. The end label must be added to all section labels. (<P> example section ...... Text </P>) Remember That (x) HTML does not add any updated tags for HTML, but standardizes the use of HTML tags and removes some unreasonable tags, and the attributes in the tag. What are the attributes of paragraph tags? How much does it stay? Zhenzhi consulted some documents.

Align attribute: the written method is <p align = left> </P>. The attribute values include left, right, center, and justify ). This is an alignment attribute used to manage the text alignment direction in a paragraph. However, in (x) HTML, the browser still supports this attribute. Even so, we still don't need to use it. Why not? Because this attribute can be easily implemented through CSS, we don't need to add these attributes to the code one by one.

You can use the following attributes: ID, class, style, and title. These attributes will be analyzed in articles later in this column. You only need to understand that these attributes can be used in section labels.

Well, if you haven't tried to set a paragraph label for the article, you should add this code to your project from now on. This will make it easier for you to master web standards.

In addition, P is a block-level label, but it cannot appear in this block-level label. For the nesting rules of (x) HTML, refer to the nesting rules under (x) HTML strict translated and explained by junchen.

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.