Home » HTML » Html miscellaneous » Question
  1. What should be the set value of background-size property such that image will cover the entire content area?
    1. contain
    2. cover
    3. 100%100%
    4. 100%
    5. None of these
Correct Option: B

If background-size property is set to “cover”, background image will scale to cover entire content area. “cover” value keeps the aspect ratio and some part of background image may be clipped. E.g. div {width: 100%; height: 390px; background-image: url(‘img_tyu.jpg’); background-size: cover;}



Your comments will be displayed only after manual approval.