CSS – Syntax

0
510
CSS Syntax

The CSS syntax consists of a set of rules. These rules have 3 parts: a selector, a property, and a value.

Syntax:

selector { property: value }

The selector is a link between the HTML document and the style, and all HTML tags are potential selectors.

Example

h1 { color: red }

This code tells the browser to render all occurrences of the HTML <h1> element in red.

 

 

SHARE
Previous articleWhat is C ++
Next articleCSS – Inclusion