CSS Summary

What is CSS ?

CSS , short for Cascading Style Sheets , is a style sheet language used to define layouts for HTML documents. For example, CSS deals with fonts, colors, margins, height, width, background images, advanced positioning, and more.


Difference Between CSS and HTML

1. HTML can be used to add layout effects to a website, but it can be misused. CSS, on the other hand, provides more options, and is more precise and complete. All browsers now support CSS.

2. HTML is used for structured content; CSS is used to format structured content.

(This point may not be easy to understand, look at this paragraph, it may be clearer.

    In the days when Tim Berners-Lee invented the World Wide Web, HTML was the only language used to add structure to text. Authors can mark up text by stating "this is a heading" (using h1 tags) or "this is a paragraph" (using p tags).

    As the Web grew in popularity, web designers began to look for possibilities to add layout to their web pages. To this end, the browser makers at the time (Netscape and Microsoft) invented some new HTML tags (such as <font>, etc.) to introduce a new layout—not a new structure.

This has also led to more and more misuse     of text-structured tags (such as <table>, etc.) for page layout. Many new layout tags (such as <blink>) are only supported by one browser. "You need a browser of XXX to view this page" became a common statement on many websites at the time. CSS was invented to improve this situation, providing web designers with full-fledged layout capabilities that all browsers support. Moreover, the separation of presentation style and content of documents also makes website maintenance much easier. )


What are the benefits of using CSS ?

CSS is a revolution in the web design world. Specific advantages of CSS include:

* Control the layout of multiple documents through a single style sheet;

* More precise layout control;

* Adopt different layouts for different media types (screen, print, etc.);

* Countless advanced, advanced techniques.


Usage of CSS

There are many specific usages of CSS on the Internet. The specific usage can be learned by clicking on the link, not listed one by one.

 

Websites suitable for learning: http://www.w3school.com.cn/cssref/index.asp

CSS official website translation: http://zh.html.net/tutorials/css/

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325520477&siteId=291194637