Computer Applications
What would this CSS rule do ?
h2 { font-size:2em;
}
- Make fonts in a specific h2 tag double in size.
- Make fonts in all h2 tags double in size.
- Make fonts in all h2 tags double in size and italic.
- Make all fonts that are size 2, empty.
CSS
3 Likes
Answer
Make fonts in all h2 tags double in size.
Reason — The breakup of the rule is as follows:
h2is a selector in CSS, which targets all<h2>elements. In HTML,<h2>represents a heading level 2.{}encloses the declaration block, which contains one or more property-value pairs.font-size:2em;is a property-value pair within the declaration block. Here, thefont-sizeproperty is set to2em. The value2emmeans the font size will be twice the size of the default font size.
So, applying this CSS rule to an HTML page would result in all heading level 2 elements (<h2>) being displayed with a font size that is twice the default font size.
Answered By
1 Like
Related Questions
Which property is used to increase and decrease the text size ?
- font-width
- font-size
- text-width
- text-size
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.
How do you link an external stylesheet to a page.
<link href='somefile.css'><link rel='stylesheet' src='somefile.css'><script rel='stylesheet' href=' somefile.css'> </script><link rel='stylesheet' href='somefile.css'>
Which one of these name and value declarations would not work ?
- margin:20px 0 0 30%;
- margin;20px 30%:
- margin:20px 30%;
- margin:20px 23px 5% 30px;