From the course: CSS Essential Training

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

CSS syntax and terminology

CSS syntax and terminology

- Now that we know the process for creating CSS features, let's go over the syntax and terminology. Writing. CSS is basically creating a set of rules to tell the browser how to style the HTML elements. It starts with a selector, which is used to specify the HTML element to apply the styles to. The CSS style rules are called declarations. They must always be contained within a set of curly brackets. A declaration consists of two parts, a property which specifies the characteristic of the element to style, like the text color, which uses the color property. The second part is the value, which specifies how to style the property. In this example, the value is a specific color. The property and value must be separated by a colon and end with a semicolon. All of these parts together is called a declaration block. Some CSS properties can be written using shorthand or longhand syntax. Shorthand defines multiple styles in one…

Contents