Notice: Undefined index: action in /home2/armanpow/ on line 2
What is CSS and How Can it Be Used - Programming Codex

What is CSS and How Can it Be Used

What is CSS and How Can it Be Used

CSS is an acronym that stands for Cascading Style Sheets. This is the language use to define the stylistic execution of documents written in a markup language. Of course, HTML, or similar language, also has stylistic tags, defining the colors, fonts, layout, margins, etc., but CSS offers much more flexibility and possibilities to a webmaster.

The main advantage of CSS is dividing content structure from its presentation style. This simplifies the process of site development and maintenance. CSS offers more flexibility, saves the developers’ time and efforts, allows them use one documents to control multiple web pages.

Nowadays, CSS language is supported by all up-to-date browsers. But their interpretation of some tags can still differ. CSS helps you solve this problem, as well, as it gives you the possibility to change the appearance and layout of your document depending on the browser and media type (i.e. screen, print, mobile phone, etc.) Moreover, the devices and browsers that are not supporting CSS, will still be able to display the content.

Besides, usually CSS files are usually stored in the browser cache, which helps you save bandwidth and reduce the time needed to load a page.

So, how do you incorporate CSS into your HTML document?

There are three ways to do it.

1. In-line (the attribute style):


2. Internal (the tag style):


3. External (link to a style sheet file in the header section):

– code in the header section

body {background-color: #FF0000;} – code in style.css file.

Note that the third method is preferable, as it lets you completely separate the content and layout of your web pages, and take advantage from all CSS possibilities.

Source by Anastasia Petrusheva

Leave a Reply

Your email address will not be published.