CSS Introduction
Knowledge you need
Before continuing, you need to have a basic understanding of the following:
- HTML / XHTML
If you want to learn these topics first, please Home visit the relevant tutorials.
What is CSS?
- CSS stands for Cascading Style Sheets (Cascading Style Sheets)
- Style definitionshow to display HTML element
- Styles are usually stored inStyle sheetMedium
- Adding styles to HTML 4.0 was tosolve the problem of separating content from presentation
- External style sheetcan greatly improve work efficiency
- External stylesheets are usually stored in CSS FileMedium
- Multiple style definitions cancascadeinto a single
CSS example
A single HTML document can display different styles: See how CSS works
Styles solve a big problem
HTML tags were originally designed to define document content, as in the following example:
这是一个标题
这是一个段落。
Stylesheets define how HTML elements are displayed, just as font tags and color attributes did in HTML. Styles are usually saved in external .css files. We only need to edit a simple CSS document to change the layout and appearance of all pages.