On a web page there are various elements such as fonts, spacing, margin, etc. whose presentation need to be specified for formatting and presentation of information. At the same time, the presentation of these elements should be separate from the structure (headings, body text, links, etc.) of the web document to be published on that particular page. This is achieved by means of a technology referred to as Cascading Style Sheets, more popularly known as CSS. There are three types of Cascading Style Sheets namely, local (in-line), internal, and external.
Benefits Of Using CSS
There are a number of benefits of using CSS. Some of them are as follows:
- With the use of CSS, a web designer can separate content and presentation in web documents. This facilitates to modify a webpage's appearance without manipulating its HTML structure.
- There is greater control over formatting and display of HTML documents.
- Use of CSS is time saving as well. Conventionally, formatting was done by means of extensive, redundant HTML code but CSS allows formatting of web pages by scripting a few lines of code.
- Formatting can be applied and modified globally.
- Cascading Style Sheets can be shared across multiple documents on entire Website.
Downsides Of Using CSS
CSS is not independent of a few downsides. Some of them are listed as follows:
- When you are using CSS, you are required to test the compatibility of the web pages with multiple browsers.
- When using CSS, margin collapsing is useful but its quite complicated.
- There are no variables used in CSS which forces one to replace-all when there is a need to change a fundamental constant.
- CSS supports only one background image for each element. This is a big limitation especially when highly graphical designs are required.
On the whole, CSS technology proves to be a powerful means for effective web designing. Although, CSS are not perfect yet they enable designers to set certain styles in an accurate and convenient manner. For the same reason, Cascading Style Sheets are rated highly among many Web Designers