Skip to the content.

Cascading Style Sheets

What is CSS?

CSS (Cascading Style Sheets) allows coders to create great-looking web pages. Starting with very basic document text styling, like changing the color and size of headings and links. It can also be used to create a layout for instance turning a single column of text into a layout with a main content area and a sidebar for related information. It also can even be used for effects such as animation.

CSS Syntax

CSS is a rule-based language, The coder defines the rules by specifying groups of styles that should be applied to particular elements or groups of elements on the web page. An example below shows the syntax: CSS Syntax

Selectors

A selector is simply the element to be styled. But selectors aren’t just elements. They could be attributes, pseudo-classes, ids, classes, and descendants. Here are some examples of selectors:

How To Insert CSS

There are three ways of inserting a style sheet:

References:

Return

Home Page