Basics of CSS Structure
CSS consists of rules that define how to style certain HTML elements
with certain attributes
in certain ways
.
To select specific HTML elements, CSS uses selectors
, and assigns styles through properties
with specified values
.
Basic CSS Structure
selector { property: value; }
For example, the following code applies the color
property to an h1
tag to change the text color to red.
CSS Example
h1 { color: red; }
Here, h1
is the selector
, color
is the property
, and red
is the value
.
A semicolon ;
is always placed at the end of a value
to indicate the end of the line.
Mission
0 / 1
What is the most appropriate option to fill in the blank?
CSS is composed of .
Selectors, properties, values
Tags, properties, values
Selectors, elements, properties
Tags, selectors, values
Lecture
AI Tutor
Design
Upload
Notes
Favorites
Help