Interview Prep
Interview questions, roadmaps and practice sets
Tutorials
Free tutorials on 30+ topics
Blog
Career guides, skills and interview tips
Free PDFs
Notes, cheat sheets and question banks
Certificates
Free skill tests and course certificates
Tools & Whiteboard
Free tools you can use right in the browser
Practice Tests
Mock tests, MCQs and quick Q&A
Free LMS
Learn on the Uncodemy LMS
Choose the best training program according to your career.
Improve the performance of your business with our innovative Industrial Training Program.
Read More →
Our instructor-led training classes are designed to make you an expert.
Read More →
Real-life case studies are a great way to demonstrate your practical knowledge.
Read More →
Explore blogs, latest technologies and industry updates with practical examples.
Read More →Browse all available training programs and choose the right one for your career.
Read More →Know more about who we are and what we stand for.
Discover our mission to equip individuals with essential IT skills and industry expertise.
Read More →
Free tutorials, interview questions, tools and calculators to help you learn.
Explore →Learn, practice and plan your career — bilkul free.
Book a free video counselling session and pick the right course for you.
Read More →Google Fonts improves readability when you pick a font designed for screens (for example Inter, Roboto, Open Sans, Noto Sans or Source Sans 3 for body text), load only the weights you use with display=swap, and set comfortable typography: a body size of about 16 to 18px, line height around 1.5, lines of roughly 45 to 75 characters and enough colour contrast. This guide gives the exact embed code, CSS you can copy, performance tips and when to self-host instead.

Font choice matters, but most readability problems come from how text is set, not which typeface is used. The main factors are:
| Use | Google Fonts options | Why |
|---|---|---|
| Body text and UI | Inter, Roboto, Open Sans, Source Sans 3, Lato, Noto Sans | Designed or widely tested for screens; many weights; variable versions available for most |
| Long-form reading (serif) | Merriweather, Lora, Source Serif 4, Literata | Sturdy serifs that hold up at screen sizes |
| Headings with personality | Poppins, Montserrat, Playfair Display, DM Serif Display | Distinctive at large sizes; avoid them for small body text |
| Code | JetBrains Mono, Fira Code, Source Code Pro, Roboto Mono | Monospaced with clear 0/O and 1/l |
| Hindi and other Indian scripts | Noto Sans Devanagari, Mukta, Hind, Poppins (Latin + Devanagari) | Proper Devanagari glyphs and matras that pair with Latin text |
| Accessibility focus | Atkinson Hyperlegible | Created for the Braille Institute to maximise letter distinction for low-vision readers |
Use one family for body text and at most one more for headings. Every extra family or weight adds a download and makes the design less consistent. Test your choice with real content, including numbers, bold text and your language's script, at 390px width.
On fonts.google.com, open a family, choose styles and copy the embed code. For Inter in regular (400) and semi-bold (600) it looks like this:
<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;600&display=swap" rel="stylesheet">
Put it in the <head>. The two preconnect hints open connections early: one to the CSS host and one to the font-file host (which needs crossorigin). display=swap adds font-display: swap, so text appears immediately in a fallback font and switches when the web font arrives, instead of staying invisible.
For a variable font, request a range instead of single weights, for example family=Inter:wght@100..900. One variable file can then cover every weight you use.
:root {
--font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
body {
font-family: var(--font-body);
font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem); /* 16px on phones, up to 18px */
line-height: 1.6;
color: #1f2328; /* about 15:1 contrast on white */
background: #ffffff;
}
article p, article li {
max-width: 68ch; /* keeps lines near 65-75 characters */
}
h1, h2, h3 {
line-height: 1.2;
font-weight: 600;
}
The fallback list matters: if the web font fails or is slow, the system font shows, so choose fallbacks with similar proportions. clamp() gives fluid sizing without media queries. The ch unit is based on the width of the "0" character, which makes it a convenient way to cap line length. For more on scaling type across devices, see adaptive UI with responsive typography.
text= parameter.next/font) can generate adjusted fallbacks automatically.Every visitor's browser contacts Google's servers when you embed fonts from Google, which shares their IP address with Google. In January 2022 a regional court in Munich ruled that a website breached the GDPR by doing this without consent, and many European sites switched to self-hosting. All Google Fonts are open source (mostly under the SIL Open Font License), so you can download and serve them yourself:
/* fonts/inter-var.woff2 downloaded from the family's page or via Fontsource */
@font-face {
font-family: "Inter";
src: url("/fonts/inter-var.woff2") format("woff2");
font-weight: 100 900;
font-style: normal;
font-display: swap;
}
With npm you can install a package such as @fontsource/inter and import it in your build. Self-hosting also removes the extra connections to Google's domains.
display=swap or font-display: swap set.There is no single winner. Inter, Roboto, Open Sans, Source Sans 3 and Noto Sans are all designed for screen reading; Atkinson Hyperlegible is aimed at low-vision readers. Size, line height and contrast affect readability more than the specific font.
They add requests, but with preconnect, display=swap and only one or two weights the impact is small. Self-hosting a single variable WOFF2 file is usually the fastest option.
Yes. Fonts in the Google Fonts library are released under open-source licences, mostly the SIL Open Font License, which allows commercial use and self-hosting.
Related tutorials: build your first website with HTML and CSS, responsive web design and creating hero images with AI generators.