What is a Favicon?
A favicon is a small icon displayed in the browser tab, bookmarks, and address bar that represents your website.
Basic Syntax
HTMLRead-only
1
Where to Add Favicon?
The favicon link should be placed inside the <head> section of your HTML document.
HTMLRead-only
1
Supported Formats
| Format | Description |
|---|---|
| ICO | Most widely supported |
| PNG | Modern and high-quality |
| SVG | Scalable vector format |
| GIF | Supports animation (limited use) |
Multiple Icon Sizes
HTMLRead-only
1
Apple Touch Icon
HTMLRead-only
1
Best Practices
- Use .ico or PNG for compatibility
- Provide multiple sizes for different devices
- Keep favicon simple and recognizable
- Optimize file size for performance
- Place favicon in root directory for fallback
Common Mistakes
- Incorrect file path
- Using unsupported formats
- Not adding favicon in head section
- Large file size affecting performance
Conclusion
A favicon enhances branding and user experience by making your website easily identifiable in browser tabs and bookmarks.