🌐
Hack the Web
  • Welcome to Hack the Web
  • Getting Started
    • πŸ”₯Course Overview
    • Why This is Important
    • πŸ› οΈWhat We Will Build
  • Build with the Basics
    • Build with the Basics
    • HTML
    • CSS
    • JavaScript
    • πŸ’₯Putting it all together
    • Design Systems and CSS Frameworks
  • Design Basics
    • What Makes Good Design
    • πŸ³οΈβ€πŸŒˆColors, Colors, Colors
    • πŸ”‘Typography and Fonts
    • πŸŒ€Graphics for Your Site
      • Types of Images
      • Where to Find Graphics
      • Image Formats
      • Other Media Formats
    • πŸ¦„Icons
  • Don't Start From Scratch
    • ▢️Template Walkthrough
  • Misc Topics
    • Search Engine Optimization
    • ⭐Favicons
    • β˜‘οΈHTML & CSS Validation
    • πŸ“ŠPerformance Testing
    • Markdown
    • Mobile Responsive Design
  • Advanced Topics
    • Hosting Sites
    • ↔️Backend vs Frontend Development
    • βš™οΈBrowser Built-In Web Tools
  • Real-World Applications
    • πŸ’ΌCareer Paths in Web Design
    • Wordpress, Drupal, Website Builders
  • Conclusion
    • πŸŽ‰Course Recap
    • πŸ“Quiz for Certificate
    • πŸ¦‰Keep on Learning
  • SouthHills Info Request
Powered by GitBook
On this page
  • Typography and Fonts on Web Pages
  • Using a Google Font
  1. Design Basics

Typography and Fonts

PreviousColors, Colors, ColorsNextGraphics for Your Site

Last updated 6 months ago

Typography and Fonts on Web Pages

Typography in web design involves the strategic use of fonts to enhance readability, accessibility, and aesthetics. Here are key considerations:

  • Font Choice: Choose web-safe fonts or use Google Fonts to ensure consistency across devices and browsers.

  • Font Size and Line Height: Maintain a legible font size and appropriate line height to ensure comfortable reading.

  • Contrast: Ensure sufficient contrast between text and background for readability.

  • Hierarchy: Use different font weights and sizes to establish a clear hierarchy and guide the reader’s eye.

  • Responsive Design: Ensure your typography adjusts well on different screen sizes to maintain readability.

Remember, effective typography enhances user experience and communicates the brand's voice effectively.

Using a Google Font

To utilize a Google Font in your web design, include the corresponding link in the <head> section of your HTML file:

<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet">

Then, apply the font in your CSS:

body {
    font-family: 'Roboto', sans-serif;
}
πŸ”‘