What is CSS and how does it work?
What is CSS?
CSS handles the look and feel part of a web page. Using CSS, you can control the color of the text, the style of fonts, the spacing between paragraphs, how columns are sized and laid out, what background images or colors are used, layout designs,variations in display for different devices and screen sizes as well as a variety of other effects. CSS is easy to learn and understand but it provides powerful control over the presentation of an HTMLdocument. Most commonly, CSS is combined with the markup languages HTML or XHTML.
CSSwas invited by HÃƒÂ¥kon Wium Lie on October 10, 1994 and maintained through a group of people within the W3C called the CSS Working Group. The CSS Working Group creates documents called specifications. When a specification has been discussed and officially ratified by W3C members, it becomes a recommendation.
How does CSS Work?
When a browser displays a document, it must combine the document's content with its style information. It processes the document in two stages:
- The browser converts the markup language and the CSS into theÃ‚Â DOMÃ‚Â (Document Object Model). The DOM represents the document in the computer's memory. It combines the document's content with its style.
- The browser displays the contents of the DOM.