CSS units
Created @May 22, 2023 8:46 PM
Class
Type
Reviewed
Materials
1@ Which of the following is not correct?
a) margin:100%
b) padding:10pt
c) img:20px
d) top:40px
2@ Which CSS unit represents fraction of the viewport width?
a) pt
b) %
c) vw
d) em
3@ Which CSS unit is relative to the font size of parent element?
a) px
b) rem
c) vw
d) em
4@ Which CSS unit represents a fixed length regardless of screen size
CSS units 1
a) px
b) vh
c) vw
d) rem
5@ Which of the below units is an absolute unit?
a) vh
b) %
c) pt
d) rem
6@ Which of the below units is relative to font size of the root element?
a) em
b) in
c) pt
d) rem
7@ Which CSS unit is used to represent a percentage relative to the height of parent
element?
a) %
b) in
c) vh
d) rem
8@ Which of the below units is relative CSS unit?
a) %
b) in
CSS units 2
c) cm
d) px
9@ What will be the actual font size of the h1 element?
Body{
font-size:10px
h1{
font-size:2.5em
a) 10px
b) 2.5rem
c) 2.5em
d) 25px
10@ What will be the actual font-size of the h2 element in px?
Body{
font-size:2em
h2{
font-size:2em
a) 40px
b) 80px
c) 16px
d) 64px
CSS units 3
CSS units 4