CBSE Class 10 Computer Applications Question 4 of 56

Cascading Style Sheets (CSS) — Question 4

Back to all questions
4
Question

Question 4

Diya wants to display all the text on her web page in blue colour with font size 3. Suggest Diya, which selector she should use to achieve the same.

Answer

To display all the text on her web page in blue color with a font size of 3, Diya should use the universal selector ' * '. The universal selector selects all elements on the page, and she can then apply the desired styles to them in the following way:

<HTML>
<HEAD>
<STYLE Type = "text/css">
*
{
Color:blue;
Font-size: 3;
}
</STYLE>
</HEAD>
<BODY>
<H1>Universal Selector</H1>
<P>Using Universal Selector in CSS</P>
</BODY>
</HTML>