L
L
leonid140320042021-12-10 19:42:37
css
leonid14032004, 2021-12-10 19:42:37

How to include multiple fonts in html?

How to use different fonts on the same site?
I connect through Google fonts 3 types of one font

<link href="(тут https) fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,[email protected],400;0,500;1,700&display=swap" rel="stylesheet">

But in css it says you need to insert . That is, the text becomes one style of the given font. How to set a certain style? That is, how to prescribe a font for one tag , and for another tag , and put one in the Open sea font at all? font-family: 'IBM Plex Sans', sans-serif;
<p>regular 400<p> bold 700 italic<p>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey delphinpro, 2021-12-10
@leonid14032004

That is, how to prescribe regular 400 font for one tag, and bold 700 italic for another tag, and put one in the Open sea font at all?

Well, do exactly as you wrote.
p.one {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 400;
}
p.two {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 700;
  font-style: italic;
}
p.three {
  font-family: 'Open Sea', sans-serif;
}

As noted above, it is better to set the main font family for the entire page, changing only the weight and style in the right places.

M
moreqa, 2021-12-10
@moreqa

font weight

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question