CSS Introduction


Knowledge you need to have

Before you continue, you should have a basic understanding of the following:

  • HTML / XHTML

If you wish to learn these items first, pleaseHomeVisit related tutorials.


What is CSS?

  • CSS stands for Cascading Style Sheets (Cascading Style Sheets)
  • Style DefinitionHow to displayHTML Elements
  • Styles are usually stored inStyle SheetMedium
  • Styles were added to HTML 4.0 in order toSolves the problem of separating content from presentation
  • External Style SheetCan greatly improve work efficiency
  • External style sheets are usually stored inCSS FileMedium
  • Multiple style definitions canCascadeFor a

CSS Examples

An HTML document can display different styles:See how CSS works


Styles solve a very big problem

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

<h1>这是一个标题</h1>
<p>这是一个段落。</p>

Style sheets define how HTML elements are displayed, just like the font tags and color attributes 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.

other extensions