Lecture
Styles are a convenient, practical and effective tool for the design of web pages and the design of text, links, images and other elements. Despite the obvious advantages of the use of styles, we will consider all the advantages of CSS, including those that are imperceptible at first glance.
The idea that the HTML code is free from design elements such as color, font size and other parameters is as old as the world. Ideally, a web page should contain only logical formatting tags, and the appearance of the elements is specified through styles. With such a division, work on the design and layout of the site can be conducted in parallel.
Using styles, you can determine the appearance of a web page for different output devices: a monitor, printer, smartphone, tablet, etc. For example, display the page in one design on a monitor, and in another when printed. This feature also allows you to hide or show some elements of the document when displayed on different devices.
Unlike HTML, styles have much more possibilities for the design of web page elements. Simple means you can change the background color of the element, add a frame, set the font, determine the size, position and much more.
When storing styles in a separate file, it is cached and when re-accessed it is retrieved from the browser cache. Due to caching and the fact that the styles are stored in a separate file, the code of web pages is reduced and the loading time of documents is reduced.
A cache is a special place on the user's local computer, where the browser stores files when it first accesses the site. The next time you access the site, these files are no longer downloaded over the network, but are taken from the local disk. This approach can significantly increase the speed of loading web pages.
The site is not just a set of related documents, but the same location of the main blocks, and their appearance. The use of uniform design of headings, main text and other elements creates continuity between pages and facilitates users to work with the site and its perception as a whole. For developers, the use of styles greatly simplifies the design of the design.
Styles, as a rule, are stored in one or several special files, the link to which is indicated in all documents of the site. Thanks to this, it is convenient to edit the style in one place, while the design of the elements automatically changes on all pages that are associated with the specified file. Instead of modifying dozens of HTML files, it is enough to edit one file with the style and the design of the necessary documents will immediately change.
Comments
To leave a comment
Cascading CSS / CSS3 Style Sheets
Terms: Cascading CSS / CSS3 Style Sheets