🍋
Menu
How-To Beginner 1 min read 215 words

How to Create an Effective Favicon Set for Modern Browsers

A proper favicon implementation requires multiple file formats and sizes to support browser tabs, bookmarks, app icons, and PWA manifests. This guide covers the minimal set of files every website needs.

Key Takeaways

  • The classic 16x16 favicon.ico is no longer sufficient.
  • Add these four link tags to your `<head>`:
  • SVG favicons are resolution-independent, making them crisp on any screen density.
  • The manifest.webmanifest file declares your PWA icons.
  • Serving only favicon.ico without other sizes.

Beyond favicon.ico

The classic 16x16 favicon.ico is no longer sufficient. Modern browsers and operating systems use icons in various contexts that require different sizes and formats.

The Essential Favicon Set

File Size Purpose
favicon.ico 32x32 Browser tabs, bookmarks, legacy
icon.svg Scalable Modern browsers (dark mode support)
apple-touch-icon.png 180x180 iOS home screen
icon-192.png 192x192 Android Chrome, PWA
icon-512.png 512x512 PWA splash screen
icon-mask.png 512x512 Android adaptive icons

HTML Implementation

Add these four link tags to your :





SVG Favicon Benefits

SVG favicons are resolution-independent, making them crisp on any screen density. They also support CSS, including prefers-color-scheme for automatic dark mode adaptation.

Web App Manifest

The manifest.webmanifest file declares your PWA icons. Include at least 192x192 and 512x512 sizes, plus a maskable icon for adaptive icon support on Android.

Common Mistakes

  • Serving only favicon.ico without other sizes.
  • Using sizes="any" on the .ico link (use sizes="32x32" instead).
  • Forgetting apple-touch-icon (iOS defaults to a screenshot).
  • Not testing maskable icons in Android's safe zone.

เครื่องมือที่เกี่ยวข้อง

รูปแบบที่เกี่ยวข้อง

คู่มือที่เกี่ยวข้อง