wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Written Work 4 (.NET Technology)

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

Which selector is most efficient for applying the same style to multiple different tags?

a)

Universal selector

b)

Group selector

c)

ID selector

d)

Class selector

2.

What does the universal selector (*) do?

a)

Selects one element

b)

Selects only text

c)

Selects all elements

d)

Selects only headings

3.

Which selector styles an element with id="main"?

a)

#main

b)

.main

c)

main

d)

*main

4.

Which selector is used to style all <h3> elements?

a)

#h3

b)

.h3

c)

h3

d)

*h3

5.

Which selector styles all elements with class="highlight"?

a)

#highlight

b)

.highlight

c)

highlight

d)

*highlight

6.

What is the difference between an ID selector and a Class selector?

a)

IDs can be used many times, Classes only once

b)

IDs are unique, Classes can be reused

c)

IDs style text only, Classes style layout only

d)

They are exactly the same

7.

Which selector applies the same style to both <h1> and <h2> elements?

a)

h1 h2

b)

h1, h2

c)

#h1, #h2

d)

.h1, .h2

8.

If you want to apply a style to all element on a webpage, which selector should you use?

a)

#id

b)

.class

c)

*

d)

element

9.

If two elements have the same class, applying a style with .red will affect...

a)

Only the first element

b)

All elements with class="red"

c)

Only the last element

d)

No elements

10.

Which selector would apply styles to every <h1> on the page regardless of where it appears?

a)

A. h1

b)

B. .h1

c)

C. #h1

d)

D. *h1