Design comparison
SolutionDesign
Community feedback
- @al-ameen36Posted almost 2 years ago
Hello Titima, Great work.
A simple way to add fonts to website
- Go to fonts.google.com.
- Search for and choose your desired font family.
- Select the font styles you want.
- Copy the link tags and paste them in your project's
<head>
tag. - Copy the CSS rule and use it in your CSS file.
The link tags and CSS rule are available in the "Selected family" side bar that shows up once your start choosing font styles and weights, if you don't see it, click on the icon at the top right corner of the page.
For example the code could look something like this -
HTML
<head> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700;800&display=swap" rel="stylesheet"> <head>
CSS
body{ font-family: 'Inter', sans-serif; }
Good luck :)
Marked as helpful0@phyfatimaPosted almost 2 years ago@Ameen36
Thank you, Muhammad,
it's noted, I appreciate your comment, it's very helpful.
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord