⊗mkPmCLInr 24 of 250 menu

Basics of working with CSS language

We have already covered the basic HTML tags and now it's time to make it pretty. I would like to be able to change the text color, its size, background and much more. This is done using the CSS language.

As a rule, CSS commands (styles) are stored in a separate file, which is connected with a special tag to all HTML pages of our site.

The advantage of this approach is that there is only one CSS file, and there can be any number of HTML files, even a thousand. If we make a change in one place of the CSS file, for example, paint all paragraphs red, then these changes will be applied to all thousand HTML pages to which our CSS file is connected. Very convenient and fast.

The style file must have the extension .css. To include such a file to the HTML page, the following structure should be written in the head tag:

<link rel="stylesheet" href="fileName.css">

In the following example, the CSS file styles.css is included in our HTML file:

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>This is the title</title> <link rel="stylesheet" href="styles.css"> </head> <body> <p> This is a paragraph with text. </p> </body> </html>

Create and include the styles.css file in all your pages.

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline