The Language of CSS (Cascading Style Sheets)
06 November 2020, Friday

Today in the "Programming Languages" section, we'd like to talk about the language of CSS stylesheets. This is, in fact, not strictly a programming language, since it describes presentation (appearance or description), whereas programming languages describe a function.

What is CSS, anyway? It is an abbreviation of Cascading Style Sheets, and refers to a language for describing the appearance of an HTML document, one of the basic technologies on the internet.

Almost no websites can do without CSS, so HTML and CSS work in tandem, yet they are completely different.

HTML structures the document itself and organizes the information, while CSS interacts with the browser to give the document its visual appearance. We have already written about HTML in this article. Basically, CSS is used by programmers to set certain colors, different fonts, various styles, the arrangement of individual blocks, and other aspects of the presentation of these web pages.

The History of its Creation

In 1994, Håkon Wium Lie proposed using CSS for the stylistic presentation of a web page. In 1996, the first version of CSS was adopted as a recommendation by the W3C, and then in 1998, the second version of CSS, CSS2, was adopted. Subsequently, in 2009, CSS2.1 was approved as a revised version of CSS2. At present, we are on CSS3, which has been greatly expanded by comparison with previous versions. It can be used to create shadow effects, rounded corners on blocks, as well as to set an image as a background and use them as borders. This version is very convenient for working with animation.

Advantages:

  • Ease of use. CSS allows you to quickly change the style of a web page, which makes it possible to reduce the time needed for website development.
  • There are different page design options for viewing on different devices. For example, a design on a computer screen is designed for a particular width and will be displayed in its entirety on the screen, while on phones it will adjust to the size of the screen.
  • Making changes to a design is easy. A single CSS controls the rendering of multiple HTML pages. When you need to change a website's design, you don't need to edit every page. To change the design later, you just need to change the CSS file, and as a result, the design can be altered faster.
  • Offline viewing. Web apps can store CSS locally using an offline cache, which can then be used to browse sites while offline.

Disadvantage:

  • The big disadvantage of CSS is that it displays differently in different browsers. This issue is particularly prevalent when using outdated browsers.

Thus, CSS is one of the main components of any website, without which the activities of web developers would simply be inconceivable.
CSS is a generally accepted development standard that has been adopted by all development companies without exception, which clearly shows its importance and how essential it is.

A list of useful books for studying CSS that will help you master the basics:

  • CSS3: The Missing Manual.

Author: David McFarland.

Using CSS3 technology, you can create unique, modern website designs. Even the most experienced web developer may not be familiar with all of CSS3's tricks, however. Reading the plethora of practical examples and tips in this book will take you to the next level when it comes to building websites with HTML and CSS.

  • HTML5 and CSS3: Level Up with Today's Web Technologies.

Author: Brian Hogan.

The second edition contains updated information regarding the use of HTML5 and CSS3. It provides more information about HTML5 accessibility tools and describes a number of new approaches, workarounds, and scripts.

  • Learning PHP, MySQL, JavaScript, CSS & HTML5: A Step-by-Step Guide to Creating Dynamic Websites.

Author: Robin Nixon.

This book will help you master dynamic web programming using the latest technology. It is filled with valuable practical advice and contains detailed theoretical material. To reinforce this material, the author describes how to create a fully functional website that works based on the principle of a social network.

To learn more, follow our updates