Loading
QUIPO
IN
Mind Xchange
Learning
Test
MCQs
Exercises
Q & A
Log In
Mind Xchange
Learning
MCQs
Test
Exercises
Q & A
◀
JAVA
SPRING
ANGULAR
SQL
HTML
CSS
JAVASCRIPT
Data Structure
▶
HTML Tutorial
Attributes
Heading
Head
Comments
Anchor Tag
Image Tag
Favicon Tag
Imoji
Symbols
Tables
Id
Iframe
File Path
Formatting
Id
Exercises
Videos
Discussion
Q1.
What is the purpose of the id attribute?
A.
To style multiple elements
B.
To uniquely identify an element
C.
To group elements
D.
To create tables
Q2.
Which CSS selector is used to target an id?
A.
.
B.
#
C.
*
D.
%
Q3.
Which of the following is correct?
A.
Two elements can have the same id
B.
Each id must be unique
C.
id works only in CSS
D.
id cannot be used in JavaScript
Q4.
Which example uses id correctly?
A.
<p ID="para1">Text</p>
B.
<p id="123para">Text</p>
C.
<p id="para">Text</p>
D.
<p id="para" id="text">Text</p>
Q5.
IDs are mainly used for:
A.
CSS styling
B.
JavaScript targeting
C.
Page navigation
D.
D. All of the above