亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

Introduction to CSS

Before you start learning CSS, you should make sure you have the following prerequisite knowledge:

  • HTML / XHTML

To learn HTML and XHTML , you can find relevant tutorials through the PHP Chinese website (php.cn) homepage


To learn CSS, you need to know what CSS is?

  • CSS refers to Cascading Style Sheets

  • Styles define how HTML elements are displayed

  • Styles are usually stored In the style sheet

  • Adding styles to HTML 4.0 is to solve the problem of separation of content and presentation

  • External style sheets can be extremely Greatly improve work efficiency

  • External style sheets are usually stored in CSS files

  • ##Multiple style definitions can be cascaded into one


Styles solve a big problem

HTML tags were originally designed to define document content, as shown in the following example :


##This is a title

This is a paragraph.



Style sheets define how HTML elements are displayed, just like the HTML 3.2 font tag and color attributes do. Styles are usually saved in external .css files. External style sheets give you the ability to change the layout and appearance of all pages in your site at the same time by simply editing a simple CSS document.

In order to solve this problem, the World Wide Web Consortium (W3C), a non-profit standardization alliance, has taken on the mission of standardizing HTML and created styles outside of HTML 4.0.

Contemporary browsers all support CSS.


CSS style sheets greatly improve work efficiency Style Table defines how HTML elements are displayed

Style sheets define how HTML elements are displayed, just like the HTML 3.2 font tag and color attributes do. Styles are usually saved in external .css files. External stylesheets give you the ability to change the layout and appearance of all pages in your site simultaneously by editing a simple CSS document.


CSS Example

An HTML document can display different styles

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>PHP中文網(wǎng)(php.cn)</title>
    <style>
        h1{color: #00a0e9}
        p{background-color: #8de943
        }
        p.ex {margin-top:2cm;}
        p.bottommargin {margin-bottom:25%;}
    </style>
</head>
<body>
<h1>標(biāo)題</h1>
<p>一個沒有指定邊距大小的段落。</p>
<p class="ex">一個2厘米上邊距的段落。</p>
</body>
</html>

Run the program and try it



Continuing Learning
||
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>php中文網(wǎng)(php.cn)</title> <style> h1 {color:#00ff00;} p{color: #ffd4f0 } .ex {color:rgb(0,0,255);} </style> </head> <body> <h1>這是一個標(biāo)題</h1> <p>這是一個普通的段落。請注意,本文是紅色的。頁面中定義的默認文本顏色選擇器。</p> <p class="ex">這段文字是藍色的</p> </body> </html>
submitReset Code