DIV+CSS Study Notes 1

Source: Internet
Author: User

Today began to write my study notes, today is the first time to write, but I give my goal is to persist in writing, to the present of their own, but also to the future of their own, I hope the onlookers Sir forgive me.

Today, the subject of study is DIV+CSS, in fact, the standard should be called XHTML+CSS.

One: CSS four ways to control HTML

1. Inline type.

Write directly inside the label line.

Example: <p style= "font:15px; Color:green; " ></p>

2, embedded type.

Write the code between the header

Example:

<style type= "Text/css" >

<!--

#div1 {font:15px;color:blue;}

-

</style>

3. LINK Type

One of the most efficient and practical use. is also the code in

Example: <link href= "style.css" type= "Text/css" rel= "stylesheet", where the Style.css file is the CSS file that needs to be written.

Note: When using the link, note the location of the CSS file, such as:"./" means under the current folder,"... /" represents the upper-level folder.

4. Import type

The import method is used.

The priority of the above four methods is (high to low): inline, inline, link, import.

Two: page module commonly used name

1:header Head

2:content/container Content

3:footer Tail

4:nav Navigation

5:sidebar Side Bar

6:column column

7:loginbar Login Bar

8:banner Advertising

9:subnav Sub-navigation

10:submenu Sub-Menu

11:scroll scrolling

Three: box model

FOUR: block elements and inline elements

Block Element Features: The block element is a bit "overbearing", it has an exclusive line of characteristics. However drop, the float attribute can dissolve the block element not with the person gregarious exclusive line "overbearing", so that it can be aligned with other elements.

Inline elements can become block elements by Display:block. What you have to mention here is the clear property. Clear has the properties of eliminating float and restores the peers that float brings.

DIV+CSS Study Notes 1

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.