There are three ways to introduce CSS in HTML:
- inline style
- inline style
- External styles
3.1-Link
3.1 Import Type
Introduction to CSS
Now the Internet front end is divided into three layers:
- HTML: Hypertext Markup Language. Describe the page structure from a semantic perspective.
- CSS: Cascading style sheets. Responsible for the page style from an aesthetic standpoint.
- Js:javascript. Describe page behavior from an interactive perspective
Css:cascading style Sheet, cascading style sheets. The function of CSS is to add various styles to the HTML page label, and define the display effect of the page . Simple sentence: CSS separates the content of the Web page from the display style , which improves the display function.
The latest version of CSS is CSS3, and we are currently studying css2.1
Next, let's talk about why we want to use CSS.
HTML flaws:
- Not adaptable to multiple devices
- Requires the browser to be sufficiently intelligent to be large enough
- Data and display are not separated
- Function not strong enough
CSS Benefits:
- Separating the data from the display
- Reduce network traffic
- Make the entire site visually consistent
- Increased development efficiency (reduced coupling, one person is responsible for writing HTML, one person is responsible for writing CSS)
For example, there is a style that needs to be displayed on 100 pages, if it is HTML to implement, then write 100 times, now have CSS, just write it again. Now, HTML provides only data and some controls, completely giving CSS a variety of styles.
Introduction Method of 01-css