Learn CSS Practically

Explore a variety of different CSS exercises which includes margin, padding, styling, formatting and creating basic structures of a website.

CSS Introduction
CSS Properties

CSS Syntax

CSS rule set contains a selector and a declaration block.

Selector: Selector indicates the HTML element you want to style. It could be any tag like <h1>, <title> etc.

Declaration Block: The declaration block can contain one or more declarations separated by a semicolon. For the above example, there are two declarations:

color: red;

font-size: 15px;

Each declaration contains a property name and value, separated by a colon.

Property: A Property is a type of attribute of HTML element. It could be color, border etc.

Value: Values are assigned to CSS properties. In the above example, value "yellow" is assigned to color property.

Now that you know syntax is CSS, let's learn the styling ways for background in CSS


Share this page on :