CSS Cascading Style Sheets for Websites

Cascading Style Sheets or CSS is a language associated with HTML and DHTML web pages. CSS is a type of style sheet language which helps in the description of formatting and the look of the documents, written in mark-up languages such as HTML. Cascading Style Sheets are often used to style XML, HTML or DHTML web pages. There are three primary aspects of CSS: placement, styles, and the ability to cascade.

CSS Syntax

The syntax in CSS is quite simple. CSS makes use of several English keywords for specifying the names of the different types of style properties.

CSS Classes

CSS Classes are used for giving an HTML element such as a web page, a number of looks. With CSS Classes, it’s possible to have several formats for one HTML tag.


IDs have a similar use as CSS classes. One major difference between the two is that once a specific ID is declared, it cannot be used once again in the same file.

CSS Divisions

CSS Divisions are basically block elements of (X) HTML, which defines the (X) HTML file sections.

CSS Spans

Spans share a number of similarities with CSS divisions. The major difference is that they are inline elements as opposed to block level elements. When declaring a span, no line break is required.

CSS Margins

CSS Margins are very similar to CSS Padding. Unlike CSS Padding, Margins can define the white spaces which are present in the HTML element’s border.

CSS Padding

CSS Padding is the space which exists between the content of the element and the element’s border. CSS padding allows the user to modify the default padding such as tables and paragraphs.

CSS Text Properties

CSS Text can replace the font tag. It will allow the user to define the text style in ways which are better than plain HTML.

CSS Font Properties

CSS Font Properties helps in defining the font properties in which the CSS Text should be displayed.

CSS Anchors, Links and Pseudo Classes

CSS pseudo-classes are used for adding special effects to a few of the selectors.

CSS Backgrounds

CSS Backgrounds helps the user change an HTML or XML website’s background.

CSS Borders

CSS Border is the attribute which helps the user to customize the HTML element border. Compared to HTML, CSS borders allow users to create borders with minimum effort.

CSS Lists

CSS Lists allows users to create or customise HTML lists in a more powerful way, which was not possible with HTML previously.

CSS Width and Height Properties

Besides allowing users to control width and height of elements, the CSS Width and Height Properties allow users to adjust spaces between the lines.

CSS Classification

CSS classification properties help the users to specify the exact places where the HTML elements will be displayed.

CSS Positioning

Besides allowing the user to position HTML elements, CSS Positioning properties can also be used to keep elements behind one another. The four main methods of positioning include Static Positioning, Fixed Positioning, Relative Positioning, and Absolute Positioning.

CSS Pseudo Elements

CSS pseudo-elements are typically used for adding special effects to a few of the selectors.



    Sign up to our newsletter

    Get the latest tutorials, videos and special offers from 34SP.com.

    Thanks for signing up!