Properti font-weight gunakan untuk mengatur seberapa tebal atau tipis suatu huruf akan ditampilkan.
Kalau dalam Word kita hanya mengenal mode normal dan bold saja, Maka disini kita bisa mengatur ketebalan huruf dengan variasi yang lebih banyak.

Sintaks penulisan CSS font-weight

p {font-weight: bold}

Nilai (value) yang bisa dipakai untuk font-weight :




Value Keterangan
normal Default, biasa aja
bold Tebal
bolderLebih tebal dari bold
lighterLebih tipis dari normal
100
200
300
400
500
600
700
800
900
Mengatur ketebalan huruf dengan dari tipis sekali sampai tebal banget..., ukuran normal=400 dan bold=700

Contoh :

<html>
<head>
<style type="text/css">
p.normal {font-weight: normal}
p.tipis {font-weight: lighter}
p.tebel {font-weight: bold}
p.tebelan {font-weight: 900}
</style>
</head>

<body>
<p class="normal">Paragraph normal</p>

<p class="tipis">Paragraph tipis</p>

<p class="tebel">Paragraph tebel</p>

<p class="tebelan">Paragraph lebih tebel</p>
</body>

</html>


Tampilan browser:


Paragraph normal


Paragraph tipis


Paragraph tebel


Paragraph lebih tebel



Value yang lainnya coba sendiri aja yaa..., biar cepet mahir...
These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • Reddit
  • Spurl
  • StumbleUpon
  • Technorati

Leave a comment

Bitcoin gratis Free bitcoin | Macul bitcoin | Free PSD Graphics