PrepAway - Latest Free Exam Questions & Answers

In which order will the five style sheets be applied by…

DRAG DROP
You are creating an application by using HTML5 and CSS3. The styles for the pages are derived from five style
sheets.
You need to order the style sheets by greatest CSS rule weight to lowest CSS rule weight.
In which order will the five style sheets be applied by the browser? To answer, move the style sheet types from
the list of style sheet types to the answer area and arrange them in the order in which the browser will apply
them. The first style sheet that the browser will apply must appear at the top of the list in the answer area.
Select and Place:

PrepAway - Latest Free Exam Questions & Answers

Answer:

Explanation:
https://www.w3.org/TR/css-cascade-3/#importance

6 Comments on “In which order will the five style sheets be applied by…

  1. KT says:

    I think the answer is wrong. They are asking “The first style sheet that the browser will apply must appear at the top of the list in the answer area.” and browser will add user agent style first. The answer should be other way around.




    8



    1
    1. itool says:

      I agree with KT. Both in this two websites

      https://www.w3.org/TR/CSS21/cascade.html#cascading-order
      https://developer.mozilla.org/en-US/docs/Web/CSS/Cascade

      The cascade is in ascending order, which means that the values that first appear at the top of the list will be applied first. Therefore the order should indeed be the other way around.

      However, the last rule declared wins! Therefore, !user-important rules will override !author-important rules




      0



      0

Leave a Reply