CSS Essay
Introduction
Cascading Style Sheets, or CSS, is a useful tool to enhance web pages. It was created by the World Wide Web Consortium. In CSS, a style is a group of definitions of colors, sizes, etc. A selector activates a certain style.Advantages and Disadvantages
CSS has many advantages. With CCS, the user can define the look of an entire site in one file, change an entire site easily, redefine HTML tags, shorten coding, create layers, and position content accurately. Disadvantages of CSS are that not all browsers support it and the results look different on different browsers.Ways CSS Can Be Used
CSS can be placed at three different levels. The level that has the hightest priority is directly inside an HTML tag. The next level is in the head section of an HTML document where the style definitions are enclosed in style tags. The last level is in an external style sheet.The advantages of internal style sheets include more flexibility and convenience. The advantages of external style sheets include faster loading and control of an entire site in one file. However, external style sheets have less flexibility. Web designers use external style sheets using link tags in their web pages.
There are three kinds of CSS selectors. HTML, or tag, selectors redefine an entire HTML tag. Class selectors redefine HTML tags with the class added in it. ID selectors redefine HTML tags with a unique ID. Selectors can be grouped to share the same style definitions. Context dependent selectors only work in certain contexts.