CSS: all about the ultimate tool for making sites attractive

CSS stands for “Cascading Style Sheets” and is one of the most used means in computer science to give more style to websites.

In French, the translation of CSS gives “Cascading Style Sheets”. Worked on the basis of HTML which organizes the part “text content” partCSS takes care of making the said text more pleasant to see and read.

If we could refer HTML to the engine of a car, CSS would be the external part: the body and the color. It is not essential for the functioning of a site but it is necessary so that the navigators are pleasantly directed. Its functions are divided between the layout and the format as well as the font, the colors and the tags.

Table of contents

Why is the use of CSS important?

It can’t be said enough, CSS makes websites look better. The most logical way to notice this is to try it practically. Insert a text on HTML without CSS, the text is of course visible but unstructured, without any style, monotonous. With CSS, it is possible to give titles a bright background, to signal by color changes the changes of subjects. And all these functions are available via CSS.

The advantages of using CSS

Speed of page loading

Within an HTML document, CSS has a rule that can be applied to all occurrences of the same tag. This process reduces the number of codes used in a page. And less code means faster loading.

A better browsing experience

CSS diversifies and organizes the buttons on a page. With colored buttons, titles and more airy content, the experience for browsers is much more pleasant. CSS also offers a user-friendly formatting option.

A velocity for development

A cascading style sheet can be used on several web pages. It is therefore possible to apply various rules and formatting options to a single set of codes via CSS. This facilitates the work of web developers. Especially those who promote the same product on several pages can then choose the same style of title, color, brightness.

Ease of use of formatting options

As said above, formatting is simplified since you only need to touch the formatting code on the base string and apply it to all other pages. So there is no need to format every page. CSS really makes development easy and saves developers time and energy.

CSS: compatible with various existing devices

The use of CSS through HTML is now made compatible on all electronic devices. Whether using a tablet, a computer, a smartphone or even televisions, users can do their creative work.

CSS: for whom and by whom?

The CSS tool combined with HTML is obviously designed for the benefit of browsers first. So that they have an optimized browsing experience. But on the other hand, CSS was created for developers so that they can make their sites and content attractive and stylish.

A concrete example

Here is an example of simple coding on HTML

here is my paragraph!

To have a paragraph in pink and in bold, you have to insert this CSS code :p { color:pink; font-weight:bold; }“p” (the paragraph) is what is called a “selector” – it is the part of the CSS code that informs on which HTML element the CSS style will be applied. In CSS, the selector is located to the left of the first brace. The information grouped between braces is the “declarations”. They have properties and values attached to the selector. Properties are related to font size, color and margins. The values, on the other hand, refer to the parameters of the properties. In this example, the properties are “color” and “font-weight”, and “pink” and “bold” are the values. The set that is found in brackets {Color pink; font-weight:bold;} is therefore the “statement”.

These are the fundamental principles that developers use and inter change to give different styles to their content via CSS.

CSS external, internal or inline cascading style sheets?

As in HTML, one must enter the content in plain text by means of a text editor that is accessible in the computer. Then, in three possible ways the developer can add CSS code to the HTML pages. This code can be external, internal or embedded.

External style sheets

They are saved as .css files and their use will determine the appearance of the entire website through this one file. You can also add the .html file to your external style sheet (in this case, mysitestyle.css), and all CSS instructions in this file will then be applied to your .html pages

Internal style sheets

These are CSS codes written inside the header of a specific .html page.

Inline style sheets

Inline style sheets extract from CSS written inside HTML code and essentially apply to a single instance of coding.

In some ways, external CSS is the most popular for websites. Internal CSS is more appropriate for special cases, especially for formatting options.

In summary, using CSS with HTML is logical and very convenient for developers. HTML can be the basis, CSS refers to an aesthetic and pleasant vision for both parties. As much for the developer who works on it as for the browser who will venture into it.

For other programming languages, please visit our top dedicated to big data languages.

Sources & Credits
Source: skillcrush – Credit:

Be the first to comment

Leave a Reply

Your email address will not be published.