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
From the course: CSS Essential Training
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
CSS specifications and the W3C2m 35s
-
(Locked)
CSS syntax and terminology3m 29s
-
(Locked)
CSS data types2m 42s
-
(Locked)
Type and universal selectors3m 2s
-
(Locked)
ID selectors1m 53s
-
(Locked)
Class selectors3m 39s
-
(Locked)
Combinators and selector lists3m 3s
-
(Locked)
Pseudo-classes and pseudo-elements3m 22s
-
(Locked)
Inheritance, cascade, and specificity4m 55s
-
(Locked)
Custom properties4m 42s
-
(Locked)
Referencing CSS3m 28s
-
(Locked)
Project: Create a CSS file4m 32s
-
(Locked)
-
-
-
-
-
-
-
-