CSS Online Quiz
Following quiz provides Multiple Choice Questions (MCQs) related to CSS. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.
Q 1 - Which of the following selector selects all paragraph elements whose lang attribute has a value of exactly "fr"?
Answer : B
Explanation
p[lang="fr"] − Selects all paragraph elements whose lang attribute has a value of exactly "fr".
Q 2 - Which of the following selector selects all paragraph elements whose lang attribute contains values that are exactly "fr", or begin with "fr-"?
Answer : D
Explanation
p[lang|="fr"] − Selects all paragraph elements whose lang attribute contains values that are exactly "fr", or begin with "fr-".
Answer : C
Explanation
vw − 1% of viewport width.
Q 4 - Which of the following property is used to set the background color of an element?
Answer : A
Explanation
The background-color property is used to set the background color of an element.
Q 5 - Which of the following property is used to increase or decrease the size of a font?
Answer : A
Explanation
The font-size property is used to increase or decrease the size of a font.
Q 6 - Which of the following property of a anchor element signifies visited hyperlinks?
Answer : B
Explanation
The :visited signifies unvisited hyperlinks.
Q 7 - Which of the following property specifies the width of a border?
Answer : C
Explanation
The border-width specifies the width of a border.
Q 8 - Which of the following property changes the style of top border?
Answer : B
Explanation
The border-top-style changes the style of top border.
Q 9 - Which of the following property specifies the bottom margin of an element?
Answer : B
Explanation
The margin-bottom specifies the bottom margin of an element.
Q 10 - Which of the following property serves as shorthand for the padding properties?
Answer : A
Explanation
The padding serves as shorthand for the preceding properties.