Actual p
(string 'ABC') font-size is 24px and li
('First' and 'Second') is 20px in the example below.
I was expecting 24px font-size of li
elements also.
What is the issue here?
font-size is an inherited CSS property and li
should ideally inherit computed font-size(24px) of parent p
element in this case.
div{
font-size:20px;
}
p{
font-size: 1.2em;
}
<div>
<p>
ABC
<ul>
<li>First</li>
<li>Second</li>
</ul>
</p>
</div>