--- title: font-weight slug: Web/CSS/font-weight tags: - CSS - 'CSS:Dokumentacje' - Dokumentacje - Wszystkie_kategorie translation_of: Web/CSS/font-weight ---
{{ CSSRef() }}
Własność {{ Cssxref("font-weight") }} określa wagę lub grubość czcionki.
{{cssinfo}}
font-weight: normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | {{ Cssxref("inherit") }}
<p> Alice was beginning to get very tired of sitting by her sister on the bank, and of having nothing to do: once or twice she had peeped into the book her sister was reading, but it had no pictures or conversations in it, 'and what is the use of a book,' thought Alice 'without pictures or conversations?' </p> <div>I'm heavy<br/> <span>I'm lighter</span> </div>
/* Set paragraph text to be bold. */
p {
font-weight: bold;
}
/* Set div text to two steps darker than
normal but less than a standard bold. */
div {
font-weight: 600;
}
/* Sets text enclosed within span tag
to be one step lighter than the parent. */
span {
font-weight: lighter;
}
{{EmbedLiveSample("Przykłady","400","300")}}
| Przeglądarka | Najniższa wersja |
|---|---|
| Internet Explorer | 3 |
| Netscape | 4 |
| Opera | 3.5 |