Start with p and proceed step by step_Experience exchange

WBOY
Release: 2016-05-16 12:06:13
Original
1564 people have browsed it

Many friends are still using Dreamweaver (hereinafter referred to as DW). It is undeniable that this is a very excellent software. It basically realizes what you see is what you get. Of course, it is precisely because of this that many web page developers know nothing about (x) HTML tags. However, to learn WEB standards, you must deal with tags, and you must understand their characteristics. Even if you don't plan to type the code yourself, if you continue to use DW to complete your work, you must know the role of the code stored in DW. If you want to reduce redundant code and improve the quality of web pages, then you need to understand the (x) HTML tag.

Then learning should naturally be done step by step, of course starting with the most commonly used and simple ones. If you ask, which is the most commonly used and simplest tag among all HTML tags? Then I would definitely say it is the paragraph tag, which is

. It is commonly used because almost all document files use this tag. It can be easily seen from its appearance. It has only 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 divide articles to facilitate reading. Sometimes, due to some software or human operations, the document is distinguished by other tags, use
There are many special ones. Then some people will say: Aren’t they all the same? They are all differentiated anyway. This is not the case. Although for us humans, we can use anything to distinguish paragraphs, but for machines and programs, if we need to understand paragraphs, we need to use these labels. This is the semantics of tags. Correct semantics will make your document easier to recognize by search engines. At the same time, rationally arranging the use of tags can also help with maintenance and management as well as code transplantation.

Of course, many people may have known this tag for a long time and have been using it, and have also found that the paragraph tag can be displayed without using . And this method has been used. This way of writing is allowed in HTML. However, this writing method has been standardized in (x)HTML, and all paragraph tags must be added with an end tag. (

Example paragraph...text

) It is important to remember that (x)HTML does not add any newer tags to HTML. It only standardizes the use of HTML tags and subtracts some unreasonable tags. Tags, and attributes in tags. So what are the attributes in paragraph tags? How much is left? Zhenzhi checked some literature.

align attribute: The writing method is

, and the attribute values ​​are: left, right, center, justify (justify both ends). This is the alignment attribute, which manages the alignment direction of text in a paragraph. However, the use of this attribute is no longer supported in (x)HTML. Of course, browsers still support this attribute. Even so, it’s better not to use it, why not, because we can easily implement this attribute through CSS, and there is no need to add these attributes one by one in the code.

The attributes that can be used are: id, class, style, title. These attributes will be analyzed in future articles in this column. Here, as long as everyone understands that these attributes can be used in paragraph tags.

Okay, if you haven’t tried setting paragraph tags for articles yet, why not start adding this code to your project from now on. This will make it easier and easier for you to master WEB standards.

In addition, P is a block-level tag, but no block-level tags can appear in this block-level tag. Regarding the nesting rules of (x)HTML, you can refer to "(Nesting Rules under X)HTML Strict" translated and explained by JUNCHEN
Related labels:
css p
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!