CSS Typography and Web Fonts - Abdelfattah Ragab - E-Book

CSS Typography and Web Fonts E-Book

Abdelfattah Ragab

0,0
29,99 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.
Mehr erfahren.
Beschreibung

In this book "CSS Typography and Web Fonts" we explore the CSS typography properties that control font sizes, line heights, letter spacing and more...

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB
MOBI

Seitenzahl: 20

Veröffentlichungsjahr: 2024

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



CSS Typography and Web Fonts

Abdelfattah Ragab

Introduction

Welcome to the book "CSS Typography and Web Fonts".

In this book I will explain the CSS typography properties that control font sizes, line heights, letter spacing and so on.

By the end of this book, you will be able to insert your custom fonts into your web applications, change the font properties and handle all kinds of scenarios.

Let us go!

Chapter 1: Font-related properties

font-family

The font-family property defines the font for an element.

The font-family property can contain several font names as a "fallback" system. If the browser does not support the first font, it tries the next font.

There are two types of font family names:

● family-name - The name of a font family, such as "times", "courier", "arial", etc.
● generic-family - The name of a generic family, e.g. "serif", "sans-serif", "cursive", "fantasy", "monospace".

Start with the desired font and always end with a generic family so that the browser can select a similar font from the generic family if no other fonts are available.

Separate the individual values with a comma.

If the name of a font contains spaces, it must be enclosed in quotation marks as follows:font-family: "Times New Roman", serif;

Values

● family-name, .., generic-family

family-name, .., generic-family

<style>

p {

font-size: 30px;

font-family: Arial, Helvetica, sans-serif;

}

</style>

<p>

Lorem ipsum dolor sit amet consectetur adipisicing elit. Minus magni alias

odit quia optio quae eaque, sed enim a laboriosam numquam neque velit qui

maiores quos nostrum facere in ab. Reiciendis, nostrum obcaecati dolore vel

nam quidem molestias eos magnam quibusdam aliquid accusamus sed nesciunt

necessitatibus commodi voluptatum similique et!

</p>

font-size

The font-size property sets the size of a font.

Values

● keyword
● length
● %

Keywords

● medium (default)
● xx-small
● x-small
● small
● large
● x-large
● xx-large
● smaller
● larger

medium (default)

Set the font size to a medium size.

p {

font-size: medium;

}

length

Sets the font-size to a fixed size in px, cm, etc.

p {

font-size: 30px;

}

%

Sets the font-size to a percent of the parent element's font size.

p {

font-size: 80%;

}

font-weight

The font-weight CSS property sets the weight (or boldness) of the font. The weights available depend on the font-family that is currently set.

Values

● keyword
● numeric values [1,1000]

Keywords

● normal (default)
● bold
● bolder
● lighter

Numeric values

● 100
● 200
● 300
● 400 normal
● 500
● 600
● 700 bold
● 800
● 900

normal (default)