1,CSS (cascading style Sheets) cascading style sheet . Used to define the display form of HTML elements, which is the standard technique for formatting Web page content launched by the website.
2,CSS as each website designer must master one of the technologies, there are several advantages :
(1) Improve page browsing speed, save at least 50% more file size than traditional text design method
(2) Shorten the revision time, reduce maintenance costs
(3) Combine CSS and div for better control of page layout
(4) Separation of performance, structure and content
(5) More convenient search engines
3. CSS style sheet
(1) embedded style sheet
Style settings that include styles within a Web page with the <style> element,<style> segment must appear in the
Such as:
<! DOCTYPE html>
(2)external style sheetCreated externally . CSS files, write CSS code, and then in . Used by links in HTML files.
Syntax: <link rel= "stylesheet" type= "text/css" href= "url in style sheet"/>
(3) inline style sheet
Only for part of a page element, scoped to the page element to which it is applied, inline style in HTML markup
such as: <div style= "color:red; Font-weight:bold; " > Inline Styles </div>
4. Style rules
(1) Selector Selector : Specifies which element or elements of a style rule can be used in an HTML document, and the selector is left on the left curly brace in the style rule.
such as: h1{Color:orange; Background-color: #eea; } in the H1
(2) declaration block : The section between curly braces
such as: h1{Color:orange; Background-color: #eea;} In the color:orange; Background-color: #eea; Part
(3) Statement : Each declaration is separated by a semicolon (; ) ends.
such as: h1{color:red;} in the color:red; Part is a statement
Within a declaration block, you can have multiple declarations, each of which must be separated by semicolons
(4) Properties
such as: h1{color:red; the color in the} is an attribute, and each declaration can have only one property.
(5) Notes
CSS comments are:/* Comment content */
Shortcut keys are: Ctrl + "/"
CSS Basics 1--CSS style sheets and style rules