A favicon, short for “favorite icon,” is a small icon that appears next to the website title in the browser tab and bookmarks. To add a favicon to a website, you need to create an icon file and add a link tag to the website’s HTML code.
Here are the steps to add a favicon to a website:
- Create an icon file: The favicon file should be a 16×16 pixel image saved in the ICO format. You can use an image editor like Photoshop or online tools like favicon.io to create the file.
- Save the icon file: Save the favicon file in the root directory of your website with the name “favicon.ico.”
- Add a link tag to the HTML code: Open the HTML code for your website and add the following line in the head section:
<link rel="icon" href="favicon.ico" type="image/x-icon">This code tells the browser to look for the favicon file in the root directory of your website and use it as the website icon. - Save the HTML code: Save the HTML code and upload it to your website.
After completing these steps, the favicon should appear in the browser tab and bookmarks when someone visits your website.
