wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

WEB DESIGN QUIZ P2

Total questions: 20

Worksheet time: 20mins

Name
Class
Date
1.

What is the primary use of the class attribute in HTML?

a)

Identify unique elements

b)

Define inline styles

c)

Assign multiple IDs

d)

Reference class names for styling

2.

How is a CSS class selector defined?

a)

Preceded by a full stop

b)

Preceded by a hash character

c)

Preceded by a dollar sign

d)

Preceded by an exclamation mark

3.

Can HTML classes be numbers?

a)

No, only letters are allowed

b)

No, only special characters are allowed

c)

Yes, but only odd numbers

d)

Yes, numbers are supported

4.

What does the id attribute specify in HTML?

a)

A specific style declaration

b)

A unique identifier for an element

c)

A reference to a JavaScript function

d)

A unique class name

5.

How is an id selector defined in CSS?

a)

Preceded by a full stop

b)

Preceded by a hash character

c)

Preceded by an exclamation mark

d)

Preceded by a dollar sign

6.

What is the purpose of the id attribute in HTML?

a)

Assign multiple classes to an element

b)

Identify a unique element on the page

c)

Define inline styles for an element

d)

Link to an external stylesheet

7.

How can CSS classes be reused across multiple elements?

a)

By using the same class name for each element

b)

By defining a new class for each element

c)

By using inline styles for each element

d)

By assigning IDs to each element

8.

Which symbol is used to define an ID selector in CSS?

a)

Full stop

b)

Hash character

c)

Exclamation mark

d)

Dollar sign

9.

What is the purpose of the class attribute in HTML?

a)

Identify unique elements

b)

Define inline styles

c)

Assign multiple IDs

d)

Reference class names for styling

10.

How can CSS classes be reused across multiple elements?

a)

By using the same class name for each element

b)

By defining a new class for each element

c)

By using inline styles for each element

d)

By assigning IDs to each element

11.

What does the id attribute specify in HTML?

a)

A specific style declaration

b)

A unique identifier for an element

c)

A reference to a JavaScript function

d)

A unique class name

12.

What is the purpose of the class attribute in HTML?

a)

Identify unique elements

b)

Define inline styles

c)

Assign multiple IDs

d)

Reference class names for styling

13.

How can CSS classes be reused across multiple elements?

a)

By using the same class name for each element

b)

By defining a new class for each element

c)

By using inline styles for each element

d)

By assigning IDs to each element

14.

Can HTML classes be numbers?

a)

No, only letters are allowed

b)

No, only special characters are allowed

c)

Yes, but only odd numbers

d)

Yes, numbers are supported

15.

What is the purpose of the id attribute in HTML?

a)

Assign multiple classes to an element

b)

Identify a unique element on the page

c)

Define inline styles for an element

d)

Link to an external stylesheet

16.

How is an id selector defined in CSS?

a)

Preceded by a full stop

b)

Preceded by a hash character

c)

Preceded by an exclamation mark

d)

Preceded by a dollar sign

17.

Can HTML classes be numbers?

a)

No, only letters are allowed

b)

No, only special characters are allowed

c)

Yes, but only odd numbers

d)

Yes, numbers are supported

18.

What is the purpose of the class attribute in HTML?

a)

Identify unique elements

b)

Define inline styles

c)

Assign multiple IDs

d)

Reference class names for styling

19.

How can CSS classes be reused across multiple elements?

a)

By using the same class name for each element

b)

By defining a new class for each element

c)

By using inline styles for each element

d)

By assigning IDs to each element

20.

Which symbol is used to define an ID selector in CSS?

a)

Full stop

b)

Hash character

c)

Exclamation mark

d)

Dollar sign