222k views
0 votes
The following code will size all h1 elements in "splash-section" to how many pixels? html { font-size: 12px;} .splash-section { font-size: 16px;} .splash-section h1 { font-size: 1.5em;} MCQ Options:

a. 12 pixels
b. 16 pixels
c. 18 pixels
d. 24 pixels

1 Answer

4 votes

Final answer:

The h1 elements within the .splash-section class will have a computed font-size of 24 pixels based on the provided CSS rules.

Step-by-step explanation:

To determine the size of h1 elements within the .splash-section, you need to calculate the resulting font-size based on the given CSS rules. The base font-size for the HTML document is set to 12 pixels. The .splash-section selector increases the font-size for its children to 16 pixels. Finally, the .splash-section h1 selector specifies a font-size of 1.5em. Since 'em' is a relative unit, the final size of the h1 element is 1.5 times the font-size of its parent .splash-section, which has been set to 16 pixels.

Therefore, to calculate the size of h1 elements:
16px (parent font-size) * 1.5 (h1 font-size in em) = 24 pixels.

This means that each h1 element within the .splash-section will be styled to have a font-size of 24 pixels.

User Dave Mackersie
by
8.0k points