CSS Tutorial


CSS is used for layout and beautify the page. For example font, color, margin, height, width, background image, positioning and so on.

CSS is the abbreviation of Cascading Style Sheets

The CSS language is a markup language, so it does not need to be compiled and can be executed by the browser, which is a browser-interpreted language.

A CSS file is a text file that contains some CSS markup, and CSS files must use ".css" as the file name suffix.

CSS is generated and maintained by the W3C's CSS Working Group.


Advantages

Contents and layout separation

Layout standardization, and easy to modify

CSS can support a variety of devices, such as mobile phones, PDAs, printers, televisions, game consoles and so on

CSS can reduce HTML page size, increase web browsing speed, and reduce hard drive capacity


How CSS works

Many of the CSS properties used in Cascading Style Sheets (CSS) are similar to HTML attributes

Basic CSS syntax

For example, we use red as the background color of the page:

With HTML , we can do this:

<body bgcolor="#FF0000">

With CSS , we can achieve the same effect:

body {background-color: #FF0000;}

You will notice that the HTML and CSS code is similar. The example above also shows you the basic CSS model:

selector { property: value; }



Copyright 2014-2017 by DeveloperTut.com. All Rights Reserved.
TwitterGoogle+Facebook