Div+css detailed

Source: Internet
Author: User

P+css detailed

✪p+css "The term is actually an inaccurate term.

In the first note to make a mistake, it is called "p+css" is an inaccurate term, is the Chinese people to the layout of the standard page of the name of the method, is not enough to understand the technical understanding of the cause, and the standard is what? Oh, yes, the standard term is xhtml+css!

Simply from the code to identify the past page layout method and now popular page layout method, think the past layout page with Table, called "Table+css", and now layout page, with p, so called "P+css". Sounds reasonable, do not know that this is misleading the majority of Web developers, the author of the Web page to introduce two major myths:

"Misunderstanding one" page using table, the page is not standard, and even feel ashamed of table, table became the criteria for determining whether the page is a key point.

"Misunderstanding two" that the page in the P tag with the more the better, and even someone will be the page all the labels are replaced by the number of p,p, determine the level of the page standard.

In order to avoid people entering the misunderstanding, we must understand the "table" and "P" the purpose of the two Web elements, the first table was born to store data, and P was born to set up the page structure, the two have different job functions, When you need to store data with the table is the most convenient, such as w3cfun.com a theme page "browser Daquan", the address is: http://www.php.cn/, this time is sure to use table most suitable, and the form outside the structure of the page of course with P , which is determined by the purpose of their two births, and is also in line with the standard, then this page is the standard page.

But p+css this has been deeply rooted, especially for me this just learning rookie, p+css this term is more appropriate, anyway I will use p+css this term to explain, as to whether it will mislead you on the benevolent see of the beholder, haha! I also want to comment: I guess HTML5 popularization, will not be called section+css? Haha, what do you say?

✪ What is the standard?

The standard is not a standard, but a set of standards, including three parts of the standard: structural standards, performance standards and action standards.

The representative language corresponding to the structure standard is XHTML, the representative language corresponding to the performance standard is CSS, and the representative language corresponding to the action standard is JavaScript.

OK, about the web front end of that point of common sense, the following began to do today's notes, to, because the winter vacation, this, seemingly no time to write a blog, haha, you know.

Introduction of ★P+CSS

In CSS layout, p is the core object of this layout, and our page layout is no longer dependent on the table. Just from the use of P, it only takes two things to make a simple layout: p and CSS. So we call this layout the P + CSS layout.

P: Layout Container label

P is the container label specified in XHTML that is used specifically for layout design. For storing elements of HTML elements, text, images, and videos. The content style is specified by CSS.

CSS: Cascading Style Sheets

CSS (cascading style Sheet, cascading style sheets) is a standard way of formatting Web pages, a technique for controlling web page styles and allowing the separation of style information from the content of a Web page.

Advantages of ★P+CSS

1. In line with the standards, Microsoft and other companies are supporters of the consortium.

2. Be able to the layout of the Web page, font, color, background and other graphic effects to achieve more precise control, adjustment more convenient, now many sites use P+CSS framework mode, more confirm p+css is the trend

3. Separation of format and structure, facilitate the reuse of formats and maintenance of Web pages, easier to work together in team development and reduce the correlation

The great advantage of 4.CSS is shown in the introduction of the Code, the production volume is smaller, download faster, save a lot of bandwidth, and it is well known that the search engine likes concise code.

5. Using CSS style sheets, you can point all the pages on the site to the same CSS file, so that many pages can be updated at the same time.

★ Apply CSS

BASIC syntax Structure: selector {attribute: property value;}

Example: p{color:red;}/* Comments on CSS */

Introduction Method:

Inline: Inside the HTML document, the CSS code is unloaded between the



Inline: Select the HTML tag you want to control, add a style attribute to it, note that the introduction of CSS in this way, is not required to write selectors


"Linked": in the actual site construction, the use of linked CSS is the most common effect of the best.

<1> Create a new file that is suffixed with CSS. Write the CSS inside.

<2> Add a link tag to the



"Imported": the same as the use of the link, the difference is that the syntax and usage of the method is slightly different.


<style><!--@import url (css/index.css);--></style>

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.