Preliminary understanding of CSS

CSS is an abbreviation for Cascading Style Sheets (Cascading Style Sheets) is.
CSS provides a way to tell element browser how to display the page, HTML is used to control the performance. (HTML is used to build the structure of the page)

Recognize elements of style

EG:
<style of the type = "text / CSS" >
... (here defined in the style pages)
</ style>
This is a style element.
Note:
1, <style> element always placed in the HTML header.
2, <style> tag and a (optional) attribute named type, you can tell the browser what type of style you are using. (Due to the use of CSS, it is possible to specify "text / css"). By elemental property, you can provide additional information of an element.
Below is the inclusion of CSS HTML file:
Here Insert Picture Description
line 7 is set the background color to khaki; 8, 9 lines are set margins around 20% of the page; line 10 is defined around the main page border is a dotted line, color line 11 is created within a margin around the body of the page;; black line 12 is used to define the text font.
Wherein , "body" on line 6 indicates "{" and "}" to the content of all the CSS between the HTML <body> element is used.

The results displayed in the browser as shown below:
Here Insert Picture Description

Released two original articles · won praise 2 · Views 217

Guess you like

Origin blog.csdn.net/weixin_46102597/article/details/103954954