Added section on importing fonts from Google (#22888)
This commit is contained in:
committed by
Christopher McCormack
parent
5b7fb15caf
commit
10ba73b42d
@ -19,6 +19,15 @@ mechanism for preserving style if the family-name is unavailable. A generic name
|
|||||||
family names are serif, sans-serif, monospace, cursive, fantasy, system-ui.
|
family names are serif, sans-serif, monospace, cursive, fantasy, system-ui.
|
||||||
In addition to specifying common fonts that are found on most operating systems, custom web fonts can be used as well. To import such a font, copy the font URL from the library and reference it in the HTML.
|
In addition to specifying common fonts that are found on most operating systems, custom web fonts can be used as well. To import such a font, copy the font URL from the library and reference it in the HTML.
|
||||||
|
|
||||||
|
### Importing a font from Google
|
||||||
|
If you want to use a font that is not downloaded on your computer, you can import one from [fonts.google.com](https://fonts.google.com/).
|
||||||
|
|
||||||
|
```css
|
||||||
|
<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
|
||||||
|
```
|
||||||
|
|
||||||
|
Then you can use the font that you have imported (in this example, 'Lobster') in your code as normal.
|
||||||
|
|
||||||
### Font style
|
### Font style
|
||||||
The `font-style` property can be used to specify italic text.
|
The `font-style` property can be used to specify italic text.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user