ComputersProgramming

What is CSS and where is it used?

The process of learning web design begins with the question of what CSS is. After all, this language allows you to completely change the appearance of your documents. By offering a clever alternative to outdated tags used in the usual hypertext language, CSS enables you to flexibly configure all relevant parts of the page. The World Wide Web Consortium recommends using a cascading style sheet to define the design of web documents. From this article you will learn what CSS is and where it is applied.

Definition

CSS is an abbreviation of the English Cascading Style Sheets, which in Russian means "cascading style sheets". As such, a separate programming language CSS can not be considered, since it does not matter without documents built on HTML or XHTML.

CSS styles are inextricably linked to web pages. The modern world wide web would have a too dull and unprepossessing appearance without these very tables. They allow you to make unique changes and make incredible page designs using a fairly simple language. CSS was published in 1996, and since then has been very popular, because there is no logical replacement for these stylesheets. All files written in this language have a .css extension.

Developers when creating cascading style sheets tried to simplify the work of web designers as much as possible. The main goal was to divide the logical structure of the document, which is managed using HTML or XHTML, and describe the appearance. Cascading style sheets allow you to change the font, color, background, position of elements, intervals and much more.

Essence

CSS-styles are arranged according to an extremely simple principle. There are no complicated rules and abstruse terms. It is enough to select the desired element and assign the necessary property to it. That is, you can take the

tag and change the font and color of the characters that are inside it. Each such element of the document will be assigned this property. It is not necessary to assign a value to all tags separately. You can use more large-scale goals, for example, immediately assign a property to the entire document by defining a property for the "body" element. Or to stylize a separate fragment through special id-identifiers or selectors.

Application

You can use cascading styles in three ways:

  • At the document level. You can assign a short entry in the tag itself. This option is better to use when there is no need to repeat this style.
  • Inside the document. If you have a single-page site, you can easily enter the rules of the cascading tables at the top of the document. In this case, all definitions are placed in the