Favicon in HTML
? Favicon in HTML
A favicon is a small icon displayed in the browser tab next to the page title. It helps users recognize your website quickly.
How to Add a Favicon
Prepare your favicon image
Usually a
.ico,.png, or.svgfileCommon size: 16x16 px or 32x32 px
Add a
<link>tag inside the<head>of your HTML
<head> <title>My Website</title> <link rel="icon" href="favicon.ico" type="image/x-icon"></head>Example with PNG favicon
<link rel="icon" href="favicon.png" type="image/png">Other favicon link variations
For Apple devices (iOS):
<link rel="apple-touch-icon" href="apple-touch-icon.png">For different sizes:
<link rel="icon" sizes="32x32" href="favicon-32x32.png" type="image/png"><link rel="icon" sizes="16x16" href="favicon-16x16.png" type="image/png">Quick Steps Summary
Put the favicon file in your website folder (usually root)
Add the
<link rel="icon" ...>tag inside your<head>Clear browser cache if favicon doesn’t update immediately
Would you like help generating or converting images into favicon files?