Using Font in CSS
Rabu, 06 November 2013
0
komentar
Font family [font-family]
The property font-family is used to set a prioritized list of fonts to be used to display a given element or web page.
The property font-style defines the chosen font either in normal, italic or oblique.
The property font-variant is used to choose between normal or small-caps variants of a font. A small-caps font is a font that uses smaller sized capitalized letters (upper case) instead of lower case letters.
The property font-weight describes how bold or "heavy" a font should be presented. A font can either be normal or bold.
The size of a font is set by the property font-size.
There are many different units (e.g. pixels and percentages) to choose from to describe font sizes.
Using the font short hand property it is possible to cover all the different font properties in one single property.
The property font-family is used to set a prioritized list of fonts to be used to display a given element or web page.
Font style [font-style]
h1 {font-family: arial, verdana, sans-serif;}
h2 {font-family: "Times New Roman", serif;}
The property font-style defines the chosen font either in normal, italic or oblique.
Font variant [font-variant]
h2 {font-family: "Times New Roman", serif; font-style: italic;}
The property font-variant is used to choose between normal or small-caps variants of a font. A small-caps font is a font that uses smaller sized capitalized letters (upper case) instead of lower case letters.
Font weight [font-weight]
h1 {font-variant: small-caps;}
h2 {font-variant: normal;}
The property font-weight describes how bold or "heavy" a font should be presented. A font can either be normal or bold.
Font size [font-size]
h1 {font-family: arial, verdana, sans-serif; font-weight: bold;}
h2 {font-family: arial, verdana, sans-serif; font-weight: normal;}
The size of a font is set by the property font-size.
There are many different units (e.g. pixels and percentages) to choose from to describe font sizes.
Compiling [font]
h1 {font-size: 30px;}
h2 {font-size: 12pt;}
h3 {font-size: 120%;}
p {font-size: 1em;}
Using the font short hand property it is possible to cover all the different font properties in one single property.
The above one can be rewritten as
p {
font-style: italic;
font-weight: bold;
font-size: 30px;
font-family: arial, sans-serif;
}
p {
font: italic bold 30px arial, sans-serif;
}
TERIMA KASIH ATAS KUNJUNGAN SAUDARA
Judul: Using Font in CSS
Ditulis oleh Unknown
Rating Blog 5 dari 5
Semoga artikel ini bermanfaat bagi saudara. Jika ingin mengutip, baik itu sebagian atau keseluruhan dari isi artikel ini harap menyertakan link dofollow ke https://androidpopuler.blogspot.com/2013/11/using-font-in-css.html. Terima kasih sudah singgah membaca artikel ini.Ditulis oleh Unknown
Rating Blog 5 dari 5
0 komentar:
Posting Komentar