• Send Us A Tip
  • Calling all Tech Writers
  • Advertise
Sunday, July 26, 2026
  • Login
TechStory
  • News
  • Crypto
  • Gadgets
  • Memes
  • Gaming
  • Cars
  • AI
  • Startups
  • Markets
  • How to
No Result
View All Result
  • News
  • Crypto
  • Gadgets
  • Memes
  • Gaming
  • Cars
  • AI
  • Startups
  • Markets
  • How to
No Result
View All Result
TechStory
No Result
View All Result
Home How to

How to Use Google Web Fonts in HTML

by Sangatee Goutom
November 4, 2023
in How to
Reading Time: 2 mins read
0
How to Use Google Web Fonts in HTML
TwitterWhatsappLinkedin

Because typography has such a profound effect on a website’s readability and aesthetic appeal, it is crucial to web design. Using visually arresting and unique typefaces can make a website stand out. Google Web Fonts is a great resource for a huge collection of free web-ready fonts. This article will show you how to use Google Web Fonts in HTML to enhance the appearance and feel of your web projects.

You might also like

How to spot fake online stores?

How to keep credit card points from expiring?

How to verify information online?

Select Your Fonts

With such a wide range of fonts available from Google Web Fonts, it’s critical to select the ones that best fit the design and purpose of your website. Start by perusing the selection on the Google Fonts website (https://fonts.google.com/). You can use filters to focus on specific alternatives by using categories like display, handwriting, sans-serif, and serif.

Select Fonts

Once you’ve found some typefaces you like, click to select them. The typefaces you have selected will be displayed in a floating bar at the bottom of the page. In this bar, you may review your choices, see font pairings, and change font styles like weight and italics.

Get the Embed Code

After you’ve made your final font selections, click the “Embed” tab on the floating bar. By locating the necessary HTML and CSS code, you may include the selected fonts into your website. Google provides three methods for font embedding: Standard, @import, and JavaScript. Let’s focus on the Standard approach since it is the most commonly used.

Add the HTML Code

Copy the HTML code provided by Google and paste it into the head section of your HTML document. It will look something like this:

<link rel=”stylesheet” href=”https://fonts.googleapis.com/css?family=Font1|Font2|Font3″>

In the link tag, replace “Font1,” “Font2,” and “Font3” with the actual names of the fonts you selected. You can list multiple fonts in the URL by separating them with vertical bars.

Utilise the Typefaces in Your CSS

You can declare the Google Web Fonts in your stylesheet by giving the relevant HTML elements’ font-family property the appropriate value in order to use them in your CSS. For instance, you can use the following method to apply a font to your paragraphs:

body {

  font-family: ‘Font1’, sans-serif;

}

Replace ‘Font1’ in this example with the name of the font you chose. By making the appropriate adjustments to the font-family property in your CSS rules, you can apply different fonts to different sections of your website.

Utilise the HTML’s Fonts

You can utilise the fonts in your HTML content now that you’ve defined and imported them. Just apply the selected font family to the relevant HTML elements. For example, you may use the following code to have your headings utilise the font ‘Font1’:

<h1 style=”font-family: ‘Font1’, sans-serif;”>Your Heading Text</h1>

In summary

Google Web Fonts are easy to utilise in HTML and can greatly enhance the visual attractiveness of your website. Selecting fonts that fit your website’s theme and embedding them with the provided code can create a unique and fascinating user experience. Experiment with several fonts and styles to see which complements your website’s layout the best. With Google Web Fonts’ ability to produce truly amazing typography for your website, you have an abundance of options at your disposal.

Tags: ComputerHTMLLearningtech
Tweet54SendShare15
Previous Post

Legendary French Actor Vincent Cassel to Voice Tekken 8 Newest Character

Next Post

Kia Carnival Safety Rating Still Poor Despite IIHS Crash Test Improvements

Sangatee Goutom

An English Literature student trying to find the way through the cosmos.

Recommended For You

How to spot fake online stores?

by Afeefa Ansari
July 26, 2026
0
onlinestores

So many stores online- ever wondered if all are authentic? We'll find out. Here is how you can figure out if an online store is legitimate. This is...

Read more

How to keep credit card points from expiring?

by Afeefa Ansari
July 26, 2026
0
Expiring points

Worried about credit card points expiring? Here is how you can save them from going to waste. Follow the guide to get started and save the points. How...

Read more

How to verify information online?

by Afeefa Ansari
July 26, 2026
0
Information

Do you believe everything you see on the internet? Well, sometimes we all do. But it is always important to verify the information to make out what the...

Read more
Next Post
Grey KIA

Kia Carnival Safety Rating Still Poor Despite IIHS Crash Test Improvements

Please login to join discussion

Techstory

Tech and Business News from around the world. Follow along for latest in the world of Tech, AI, Crypto, EVs, Business Personalities and more.
reach us at info@techstory.in

Advertise With Us

Reach out at - info@techstory.in

Aviator Game India 2026

BROWSE BY TAG

#Crypto #howto 2024 acquisition AI amazon Apple Artificial Intelligence bitcoin Business China cryptocurrency e-commerce electric vehicles Elon Musk Ethereum facebook funding Gaming Google India Instagram Investment ios iPhone IPO Market Markets Meta Microsoft News OpenAI samsung Social Media SpaceX startup startups tech technology Tesla TikTok trend trending twitter US

© 2025 Techstory.in

No Result
View All Result
  • News
  • Crypto
  • Gadgets
  • Memes
  • Gaming
  • Cars
  • AI
  • Startups
  • Markets
  • How to

© 2025 Techstory.in

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Are you sure want to unlock this post?
Unlock left : 0
Are you sure want to cancel subscription?