What is CSS?
Plain HTML allows you to specify the color and the size of the text using formatting tags. If you need to change settings for the same elements on the site, you'll have to go through all the pages to find and change the tags.
Cascading Style Sheets allow you to keep the color, text size, and other parameters in styles. A style is a set of formatting rules, which are applied to some parts of a document to quickly change its appearance.
Styles allow to apply with a single action an entire group of formatting attributes. They can be used, for example, to change the look of all the headings. Instead of formatting the heading in three step action, first setting size, then the font "Arial" and finally centered alignment, the same thing can be done by applying styles to the h1 tag. If you want to quickly change the appearance of text created with one of the styles, just change the style settings for all the documents in which the specific style is used, and the appearance of text will change automatically.
Another advantage of CSS is that the styles offer more options for formatting than HTML. In addition, styles can be stored in an separate file, the browser will cache these documents, so upload site will take a bit less time.
CSS is a powerful tool for site developers, improving their ability to design and layout web pages. In the scientific community, where the WWW technology originated from, people were more concerned about the content of documents rather than their design, but for most people the design, plays more important role. Limitations of HTML gave birth to many techniques to create web pages, such as:
- using different extensions of HTML;
- using images instead of text;
- using images to control the empty space, with so-called spacers;
- using tables for the layout of web pages;
- writing script instead of using HTML.
These techniques greatly increase the complexity of web page design and offer limited flexibility in their creation and management, as well as make it difficult for the people who are not acquainted to them.
Styles solve these problems, while replacing only a limited number of design functions of the HTML code.