Introduction to CSS

CSS Introduction

Knowledge you need

Before continuing to learn, you need to have a basic understanding of the following knowledge:

HTML / XHTML

If you wish to learn these items first, please visit the relevant tutorials on the home page. .

What is CSS?

CSS refers to Cascading Style Sheets

Style defines how to display HTML elements

Styles are usually stored in style sheets

Adding styles to HTML 4.0 is to solve the problem of separation of content and presentation

External style sheets can greatly improve work efficiency

External style sheets are usually stored in CSS files

Multiple style definitions can be cascaded into one

Styles solve a big problem

HTML tags were originally designed For defining document content, the following example:

<h1>Title</h1>

<p>Paragraph</p>

Style sheet Defines how HTML elements are displayed, much like the HTML 3.2 font tag and color attributes did. Styles are usually saved in external .css files. External style sheets give you the ability to change the layout and appearance of all pages in your site simultaneously by editing a simple CSS document.

Contemporary browsers all support CSS.

CSS style sheet greatly improves work efficiency

Style sheet definition how to display HTML elements

Style sheet definition How to display HTML elements, just like the HTML 3.2 font tag and color attributes play a role. Styles are usually saved in external .css files. External style sheets give you the ability to change the layout and appearance of all pages in your site simultaneously by editing a simple CSS document.


Continuing Learning
||
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>CSS测试</title> <style> body{ background-color:yellow; } h1{ text-align:center; color:green; } p{ font-family:"微软雅黑"; font-size:40px; text-align:center; } </style> <body> <h1>春晓</h1> <p> 春眠不觉晓 </p> <p> 处处闻啼鸟 </p> <p> 夜来风雨声 </p> <p> 花落知多少 </p> </body> </html>
submitReset Code