HTML Favicons
Comprehensive guide to HTML favicon implementation and optimization
Quick Start
Basic Implementation
<!-- Basic favicon -->
<link rel="icon" href="/favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<!-- PNG alternatives -->
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
File Requirements
favicon.ico
- 16x16, 32x32favicon-32x32.png
favicon-16x16.png
Formats
ICO
Ext:
.ico
Sizes:16x16, 32x32, 48x48
Support:Universal
✓ Compact, multi-size
✗ Limited colors
PNG
Ext:
.png
Sizes:16x16 to 512x512
Support:All modern
✓ High quality
✗ Larger files
SVG
Ext:
.svg
Sizes:Scalable
Support:Modern only
✓ Scalable, small
✗ Limited support
Platforms
Desktop
Sizes:
16x16, 32x32
Format:
ICO/PNG
iOS
Sizes:
180x180
Format:
PNG
Android
Sizes:
192x192
Format:
PNG
Windows
Sizes:
144x144
Format:
PNG
Best Practices
Size
Keep under 10KB
💡 Use compression tools
Format
Use ICO for compatibility
💡 Provide multiple formats
Design
Recognizable at 16x16
💡 High contrast
Ready to implement perfect favicons? Start with the basic HTML!