Q3 - WebDez_CertPrep
Quiz
•
Instructional Technology
•
9th - 12th Grade
•
Practice Problem
•
Medium
+3
Standards-aligned
Regina Parker
Used 2+ times
FREE Resource
Enhance your content in a minute
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 10 pts
How do you select an element with the ID "main-header" in CSS?
.main-header {}
#main-header {}
main-header {}
<main-header> {}
Answer explanation
To select an element with the ID 'main-header' in CSS, you use the '#' symbol followed by the ID name. Therefore, '#main-header {}' is the correct choice, while the other options are incorrect as they do not use the proper syntax for IDs.
2.
MULTIPLE CHOICE QUESTION
45 sec • 10 pts
What symbol is used to target an ID in CSS?
. (dot)
# (hashtag)
@ (at symbol)
* (asterisk)
Answer explanation
In CSS, the hashtag (#) is used to target an ID. For example, #myID selects the element with the ID 'myID'. The dot (.) is for classes, the at symbol (@) is for at-rules, and the asterisk (*) is a universal selector.
3.
MULTIPLE CHOICE QUESTION
45 sec • 10 pts
Which of the following is true about ID selectors in CSS?
An ID can be used for multiple elements in an HTML document.
An ID should be unique within an HTML document.
An ID is the same as a class.
IDs must start with a number.
Answer explanation
An ID should be unique within an HTML document, meaning it can only be assigned to one element. This ensures that styles and scripts targeting that ID affect only the intended element, unlike classes which can be reused.
4.
MULTIPLE CHOICE QUESTION
45 sec • 10 pts
Why would you use an ID selector instead of a class selector?
When you want to style multiple elements the same way.
When you need to apply a unique style to only one specific element.
When you want to apply styles globally.
There is no difference between IDs and classes.
Answer explanation
An ID selector is used to style a unique element, ensuring that the style applies to only one specific element on the page. In contrast, class selectors can be used for multiple elements.
5.
MULTIPLE CHOICE QUESTION
45 sec • 10 pts
What is wrong with following CSS rule?
#1header { color: blue; }
The ID name should be written in quotes.
IDs cannot start with a number.
The # symbol is incorrect for an ID selector.
The property color is not valid for an ID selector.
Answer explanation
The correct choice is that IDs cannot start with a number. In CSS, an ID selector must begin with a letter (a-z) or an underscore (_), making '#1header' invalid.
6.
MULTIPLE CHOICE QUESTION
45 sec • 10 pts
How do you assign an ID to an HTML element?
<p class="header">Hello</p>
<p id="header">Hello</p>
<p #header>Hello</p>
<p .header>Hello</p>
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of these selects ALL page elements?
# (hastag)
. (dot)
* (asterisk)
& (ampersand)
Answer explanation
The asterisk (*) is a wildcard selector in CSS that selects all elements on a page. The other options (#, ., &) have specific functions: # selects by ID, . selects by class, and & is not a valid selector.
Similar Resources on Wayground
20 questions
PRINCIPIOS DE PROGRAMACIÓN
Quiz
•
9th Grade
20 questions
Cars
Quiz
•
5th - 12th Grade
25 questions
BÀI 16: ĐỊNH DẠNG VĂN BẢN
Quiz
•
10th Grade
20 questions
Luyện tập 2 (bài 3,4)
Quiz
•
12th Grade
20 questions
Pemprograman
Quiz
•
10th Grade
20 questions
VB.NET + SQL
Quiz
•
12th Grade
20 questions
ENSA Module 1/2 -- Final Exam Prep, OSPF ENSA
Quiz
•
12th Grade - University
20 questions
Q1 - PRE TEST KK2
Quiz
•
12th Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
15 questions
4:3 Model Multiplication of Decimals by Whole Numbers
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
The Best Christmas Pageant Ever Chapters 1 & 2
Quiz
•
4th Grade
12 questions
Unit 4 Review Day
Quiz
•
3rd Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
Discover more resources for Instructional Technology
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
10 questions
Understanding Meiosis
Interactive video
•
6th - 10th Grade
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
28 questions
Ser vs estar
Quiz
•
9th - 12th Grade
20 questions
Cell organelles and functions
Quiz
•
10th Grade
20 questions
Christmas Movie Trivia
Quiz
•
9th - 12th Grade
10 questions
Exploring the Energy Cycle: Photosynthesis and Cellular Respiration
Interactive video
•
6th - 10th Grade
25 questions
photosynthesis and cellular respiration
Quiz
•
9th Grade






%20(1).png)