by Sai gowtham

How to add a favicon in HTML file

Favicon is a graphical image or favicon.ico file which is displayed on the browser tab that tells you which website you are browsing in.

Adding a favicon to HTML

  1. Open the website folder in your favorite code editor.
  2. Download the favicon image or favicon.ico file and place it inside the root folder of your website.
  3. Add the following link tag to <head> tag of your HTML file and replace it with your favicon path.
<link rel="icon"  href="/favicon.ico"/>

for image file

<link rel="icon" type="image/png" href="/favicon.png"/>
  1. Reload the webpage to see the new favicon you have added.

Top Udemy Courses

JavaScript - The Complete Guide 2020 (Beginner + Advanced)
JavaScript - The Complete Guide 2020 (Beginner + Advanced)
45,614 students enrolled
52 hours of video content
View Course
React - The Complete Guide (incl Hooks, React Router, Redux)
React - The Complete Guide (incl Hooks, React Router, Redux)
284,472 students enrolled
40 hours of video content
View Course
Vue JS 2 - The Complete Guide (incl. Vue Router & Vuex)
Vue JS 2 - The Complete Guide (incl. Vue Router & Vuex)
130,921 students enrolled
21 hours of video content
View Course