CBSE Class 10 Computer Applications
Question 23 of 37
Cascading Style Sheets (CSS) — Question 3
Back to all questions 3
Question Question 3
What would this CSS rule do ?
p { color:red;
}
- Make the background of all paragraphs red.
- Make the fonts of all paragraphs red.
- Make all text boxes red.
- Make the border of all paragraphs red.
Make the fonts of all paragraphs red.
Reason — The breakup of the rule is as follows:
pis a selector in CSS, which targets all<p>elements. In HTML,<p>elements represent paragraphs.{}encloses the declaration block, which contains one or more property-value pairs.color:red;is a property-value pair within the declaration block. Here, thecolorproperty is set tored, which means the text color of all<p>elements will be changed to red.
So, applying this CSS rule to an HTML page would result in all paragraphs being displayed with red text color.