CSS is the language that made websites look as we know them. Prior to its introduction, web pages were rendered using HTML, so the design of a page was tied to its content. If you had to change the content, you had to rewrite the design code along with the content and it was very time consuming. CSS solved the problem by allowing you to create designs without programming or complicated logic.
Nearly all web resources today are written in CSS, so knowing the language is a must-hard-skill for layout designers.
CSS is a descriptive language that helps you format XML and HTML documents. It offers many possibilities for page layout and approaches to element arrangement.
CSS stands for Cascading Style Sheets. Cascading Style Sheets are usually used with HTML and JavaScript, but they are three different languages:
In HTML, you structure data — you create a text document where you mark up hyperlinks, tables, bulleted lists, different levels of headings. The result is a “sheet” of text.
In CSS you work out the visual component of the web page – colors, fonts, and arrangement of elements. You take your HTML framework and apply CSS styling to it to render the existing text beautifully, and choose the colors and layouts that work best for you.
In JavaScript you control how the page behaves, giving it interactivity.
To use an analogy with the human body, HTML is the skeleton that defines structure. CSS is the skin, the eye color, the hair. And JavaScript is what makes a person move – the heart and the blood.
Let’s imagine that you want to set a non-standard color for the background. You could do it in HTML, but that is not a very useful way of doing it, because it is very cumbersome. CSS, a separate language for styling, is most commonly used.
Why CSS?
The first version of the language CSS appeared in 1996. His main task at that time – to create a design of documents without programming and complicated logic. The style consisted of colors, fonts and the positioning of individual elements on a web page.
Before the advent of CSS, the layout was created using HTML tables which caused a lot of difficulties. For example, to make a side menu of a site, in HTML-document embedded a table with columns of the right width and make its borders transparent. And to “inflate” individual cells, adding invisible images. But the most important problem is that HTML-design was tied to the content. That is, if you changed the content, you had to change the layout and rewrite endless tables. It was time-consuming, and it drove web designers nuts.
CSS was initially designed only for the design of pages, but gradually it began to be used for layout. Today it has even more potential.