Challenge: Use Variables for Better CSS Management
Task
We are tasked with styling a blog web page. The objective is as follows:
- Define the color in the
:root
block:- Create a variable named
--description-color
and assign it the value#9e6f21
.
- Create a variable named
- Apply the
--description-color
variable as a value of thecolor
property to<p>
elements with the class.description
.
index.html
index.css
- Utilize
--
followed by a descriptive name to create a variable, then set the:
and assign it a value. - Assign the value
#9e6f21
to the variable. - Employ
var()
, and within the brackets, specify the variable name to use the variable as a property value.
index.html
index.css
Tout était clair ?
Merci pour vos commentaires !
Section 1. Chapitre 10
Demandez à l'IA
Demandez à l'IA
Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion
Suggested prompts:
Posez-moi des questions sur ce sujet
Résumer ce chapitre
Afficher des exemples du monde réel
Awesome!
Completion rate improved to 2.5
Challenge: Use Variables for Better CSS Management
Glissez pour afficher le menu
Task
We are tasked with styling a blog web page. The objective is as follows:
- Define the color in the
:root
block:- Create a variable named
--description-color
and assign it the value#9e6f21
.
- Create a variable named
- Apply the
--description-color
variable as a value of thecolor
property to<p>
elements with the class.description
.
index.html
index.css
- Utilize
--
followed by a descriptive name to create a variable, then set the:
and assign it a value. - Assign the value
#9e6f21
to the variable. - Employ
var()
, and within the brackets, specify the variable name to use the variable as a property value.
index.html
index.css
Tout était clair ?
Merci pour vos commentaires !
Section 1. Chapitre 10