NEW
Font size
WorksheetsWritten Work 4 (.NET Technology)
Total questions: 10
Worksheet time: 5mins
Which selector is most efficient for applying the same style to multiple different tags?
Universal selector
Group selector
ID selector
Class selector
What does the universal selector (*) do?
Selects one element
Selects only text
Selects all elements
Selects only headings
Which selector styles an element with id="main"?
#main
.main
main
*main
Which selector is used to style all <h3> elements?
#h3
.h3
h3
*h3
Which selector styles all elements with class="highlight"?
#highlight
.highlight
highlight
*highlight
What is the difference between an ID selector and a Class selector?
IDs can be used many times, Classes only once
IDs are unique, Classes can be reused
IDs style text only, Classes style layout only
They are exactly the same
Which selector applies the same style to both <h1> and <h2> elements?
h1 h2
h1, h2
#h1, #h2
.h1, .h2
If you want to apply a style to all element on a webpage, which selector should you use?
#id
.class
*
element
If two elements have the same class, applying a style with .red will affect...
Only the first element
All elements with class="red"
Only the last element
No elements
Which selector would apply styles to every <h1> on the page regardless of where it appears?
A. h1
B. .h1
C. #h1
D. *h1
