Super basic HTML/CSS formatting -
i working on assignment while teaching myself code.
p.important { font-size: 1.5em; font-weight: 900; }
<p class="important">warning: have no slow lorises here.</p>
this supposed change font size 150% , bold...but it's not working. else in code running way want. can't work. missing something?
if haven't - need specify starting font-size.
when start new css, should set body
, html
have font-size:100%;
. ensure of text 16px starting off. then, when want text 32px, set element's font-size 2em;
body, html { font-size:100%; //sets default font size 16px; } p.important { font-size:1.5em; //is relative closest parent font-size 1.5*16 = 24px }
Comments
Post a Comment