0
0
CSSmarkup~10 mins

Comments in CSS - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to write a CSS comment.

CSS
/* [1] This is a comment */
Drag options to blanks, or click blank then click option'
AThis is
B/*
C//
D<!--
Attempts:
3 left
💡 Hint
Common Mistakes
Using // for comments, which is for JavaScript, not CSS.
Using which is for HTML comments.
2fill in blank
medium

Complete the code to comment out the CSS rule.

CSS
[1] .box { color: red; } [2]
Drag options to blanks, or click blank then click option'
A//
B/*
C<!--
D#
Attempts:
3 left
💡 Hint
Common Mistakes
Using // which only comments one line in JavaScript, not CSS.
Using # which is for IDs in CSS, not comments.
3fill in blank
hard

Fix the error in this CSS comment.

CSS
/* This is a [1] comment */
Drag options to blanks, or click blank then click option'
Awrong */
Bnested /*
Ccorrect
Dend */
Attempts:
3 left
💡 Hint
Common Mistakes
Including '*/' inside the comment text which ends the comment early.
Trying to nest comments which CSS does not support.
4fill in blank
hard

Fill both blanks to write a multi-line CSS comment.

CSS
[1] This is a
multi-line comment [2]
Drag options to blanks, or click blank then click option'
A/*
B//
C*/
D<!--
Attempts:
3 left
💡 Hint
Common Mistakes
Using // which only comments one line in JavaScript, not CSS.
Using HTML comment tags which do not work in CSS.
5fill in blank
hard

Fill all three blanks to comment out two CSS rules.

CSS
[1] .header { color: blue; } [2] .footer { color: green; } [3]
Drag options to blanks, or click blank then click option'
A/*
B*/
D//
Attempts:
3 left
💡 Hint
Common Mistakes
Using // which is not valid for CSS comments.
Not closing the comment properly with */.