A favicon (short for “favorite icon”) is the small icon displayed in the browser tab next to the page title. It also appears in bookmarks and sometimes browser history. Favicons make your website easy to recognize and give it a more professional, branded look.
Typically, a favicon is a small square image (commonly 16×16 or 32×32 pixels) that you link inside the HTML document’s <head> section using a <link> tag.
favicon.ico in the website’s root directory.16×16, 32×32 (and larger sizes for modern devices)..ico, .png, .svg (ICO gives widest support).<link rel="icon" ...> tag inside <head>.Basic steps to add a favicon to your site:
favicon.ico in your website’s root directory.<link> tag inside the <head> of your HTML document.
<!-- This line goes inside the <head> tag -->
<link rel="icon" href="favicon.ico" type="image/x-icon" />
You can also use other formats like PNG:
<!-- PNG favicon example (also inside <head>) -->
<link rel="icon" href="favicon.png" type="image/png" />
When the favicon file (for example favicon.ico) is correctly placed in your project and linked in the <head>, most browsers will show the icon next to the page title in the tab.
Important: favicons do not appear inside the webpage body. They are part of the browser’s interface (tab bar, bookmarks, sometimes history and shortcuts). If you don’t see your new favicon:
href is correct..ico for maximum browser support; PNG and SVG are fine for modern browsers..ico files from PNG or JPG images.<link rel="icon"> inside the <head>, not in the body.favicon.png, place it in your project, and link it with:<link rel="icon" type="image/png" href="favicon.png"> inside <head>.images/favicon.ico) and update the href path to match: <link rel="icon" href="images/favicon.ico" type="image/x-icon">..ico and .png versions and test them in different browsers.<head> using <link rel="icon" ...>..ico provides the broadest support.href paths, and cache clearing are key to getting your favicon to show.