CSS (Cascading style sheets)
CSS means Cascading style sheets Developed by the W3C in 1996, CSS is a complementary mechanism to the HTML code that is interpreted by the browser to define the style that will be used in the different visual elements that have been configured to create the page layout.
While HTML is used to “indicate” to the browser that certain parts of the page are titles, headers, links, subtitles, etc. CSS complements this information so that the font type, size, color or alignment used to display each element is correct.
We will give you more information about it.
1. To use CSS
The CSS code separates the structure from an HTML document from its presentation. That is, HTML defines the basic structure of the page (like a skeleton) and, on the other hand, CSS adds a layer of customization that gives the site its final layout.
This way, a web designer can make changes to the layout of any website comfortably by editing CSS without affecting content dramatically, since the content would be the same, just the way it would be displayed on the screen would be changed.
2. Types of CSS
There are three types or ways to link CSS to an website (HTML): External, internal and inline.
– External CSS. This type of CSS is created in an independent file and is linked to a document through a tag. This is the most common way to add CSS to HTML, because the designer only has to change this file for the site to be completely updated.
– Internal CSS. Internal CSS is the CSS code embedded in the HTML code, this is done using tags <style>
on the page <head>
. It is used to add styles to individual pages or sections of the site.
– Inline CSS Inline CSS is placed inside an HTML tag to only change the style of a specific element. Its use is not recommended for most situations because it doesn’t really separate style from content.
3. Advantages of CSS
The advantages of using Cascading Style Sheets (CSS) are many, here are some of the most notable ones:
- You only need to edit a single file to make changes to the layout of your entire website, no matter its size.
- It allows you to improve loading speed.
- It improves web usability
- It facilitates the indexing of the website by the searchers Spider.
- It simplifies the creation of optimized versions for different goals.
- It simplifies the updating process.
- It reduces file size.
- It can be used to create a responsive website.
- It facilitates the creation of websites.
- Working with patterns facilitates future improvements on the site.
Other Glossary Terms: