Computer Science, asked by pinky9335, 3 months ago

Consider the given code snippet:
<style type="text/css">
*{ color: yellow;}
p{ color:blue;}
</style>Which of the following statements are true with respect to the
above code?
The entire HTML page contents will be displayed in yellow color.
None of these
*{} is a universal selector and p{} is a type selector.
The entire HTML page contents will be displayed in yellow color, expect the content
present inside <p> tag.​

Answers

Answered by choudharypriyanshu71
31

Answer:

Ans 1:) The entire HTML page contents will be displayed in yellow color, expect the content

present inside <p> tag.

Ans 2:) ​*{} is a universal selector and p{} is a type selector.

Explanation:

Answered by ankhidassarma9
0

Answer:

The entire HTML page contents will be displayed in yellow color, expect the content present inside <p> tag.​

Explanation:

  • Asterisk is the universal selector which used to select all type of elements in an HTML page.Hence, *{ color: yellow;} this statement is responsible for displaying the content of the HTML page in yellow colour.
  • The presence of the statement p{ color:blue;} will ensure that the given style (i.e. color:blue) will be applied for every paragraph as it is a type selector that matches elements by node name.

Similar questions