SA-21/06, C-11, Asapur, Varanasi, UP support@kamaldnp.com +91 8318013442
Lesson 15 of 30

HTML Favicon

2 min read · Free · No login needed

Look at your browser tabs. Each one has a small icon on the left of the title — that is the favicon (short for "favourite icon"). It is your website's tiny logo. Without one, the browser shows a plain default icon, and your site looks unfinished.

How to add a favicon

Make a small square image — 32×32 or 48×48 pixels is enough — save it as favicon.ico or favicon.png, put it in your website's main folder, and add this line inside the <head> of your page:

<link rel="icon" type="image/png" href="favicon.png">

Making the icon

Use any image editor to shrink your logo to a small square. Free online tools like favicon.io can turn a PNG or a letter into a proper favicon file in seconds. Keep the design very simple — at 16 pixels wide, fine details disappear. A single letter or a bold shape works best.

Where the favicon appears

Besides browser tabs, the favicon shows up in bookmarks, in the browser history, and on the phone home screen when someone saves your site. It is a small detail, but it makes your site look professional and easy to recognise.

Tip: Browsers cache favicons aggressively. If you change yours and the old one still shows, hard-refresh the page (Ctrl + Shift + R) or clear the browser cache.

Example

Example
<!DOCTYPE html>
<html>
<head>
<title>Favicon</title>
<link rel="icon" type="image/png" href="favicon.png">
</head>
<body>

<h1>My Site</h1>
<p>Look at the browser tab — it shows my favicon.</p>

</body>
</html>

Output

Output — how it looks in the browser
Output of HTML Favicon
Try it yourself: copy the code above into a file named test.html, open it in your browser, and change the text to see what happens. That is how you learn — by changing things and watching the result.
Get certified — just ₹10

Finish all 30 lessons, pass the test (80%), pay ₹10 and get your certificate.

Take the test
Go further with a full course

Free tutorials teach you the basics. Our paid courses add live projects, mentorship and a certificate.

Master Python + AI Skills in 30 Days
₹499
View
CapCut Mobile Video Editing Course Beginner to Advance
₹99
View
WordPress Website Development Course (10 Days)
₹399
View
Browse all courses
HTML — Lessons
1. HTML Introduction 2. HTML Editors 3. HTML Basic 4. HTML Elements 5. HTML Attributes 6. HTML Headings 7. HTML Paragraphs 8. HTML Styles 9. HTML Formatting 10. HTML Comments 11. HTML Colors 12. HTML CSS 13. HTML Links 14. HTML Images 15. HTML Favicon 16. HTML Page Title 17. HTML Tables 18. HTML Lists 19. HTML Block and Inline Elements 20. HTML Div 21. HTML Classes 22. HTML Id 23. HTML Iframes 24. HTML JavaScript 25. HTML File Paths 26. HTML Head 27. HTML Layout 28. HTML Responsive 29. HTML Semantics 30. HTML Forms
Final Test — Certificate ₹10

🤖 KAMALDNP AI Assistant

Ask about courses, website & more

Hi! I'm KAMALDNP AI Assistant. Ask me about our courses, website features, or anything else! 😊
Please wait 5s...
🛡️ 7-Day Money-Back Guarantee
🤖 KAMALDNP Assistant ✕

Request human callback:

🔐 Login Required
✕

Download karne ke liye login karo. Login ke baad yahi page pe rahoge!

Naya ho? Register karo →