Velikost písma v CSS
Naučme se měnit velikost písma. K tomu slouží vlastnost font-size,
která přijímá hodnotu v pixelech.
Nastavme textu odstavce písmo o velikosti 30
pixelů:
<p>
This is a paragraph with text.
</p>
p {
font-size: 30px;
}
:
Zkopírujte si následující HTML kód na svou stránku:
<h1>Main page title</h1>
<p>
This is a paragraph with text.
</p>
<h2>Secondary heading 1</h2>
<p>
This is a paragraph with text.
</p>
<p>
This is a paragraph with text.
</p>
<h2>Secondary heading 2</h2>
<p>
This is a paragraph with text.
</p>
<p>
This is a paragraph with text.
</p>
Nastavte nadpisu h1 velikost písma
na 50px a zarovnání na střed, nadpisům
h2 velikost písma na 40px a zrušte
tučnost, a odstavcům nastavte písmo na 30px.