CSS: 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.

Table of contents

CSS: the emphasis on style

In French, the translation 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.

The essential for a better visibility and a pleasant navigation

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

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, headings 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 on 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 and even televisions, users can indulge in 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 basic 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, content must be entered in plain text using a text editor that is accessible in the computer. Then, in three possible ways the developer can add CSS code to 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 are snippets of CSS written inside the HTML code and are applied essentially 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 may 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.

Sources & Credits
Source: skillcrush – Credit:

Be the first to comment

Leave a Reply

Your email address will not be published.