HTML favicon

favicon is a small file containing the one or more icons which are used to represent the website or a blog. It is also known as a tab icon, website icon, URL icon, or a bookmark icon.

This icon is actually displayed on the address bar, browser’s tab, browser history, bookmark bar, etc. The image of a favicon is in .ico file format. There are various file formats, but .ico format is supported by all the browsers.

How to Create a Favicon

Following are the steps for creating the favicon:

  1. Click on the following URL, to create the favicon: https://www.favicon.cc/
  2. Once the favicon is successfully created, we can download the favicon by clicking on the download favicon option.
  3. 3After the downloading, a favicon with the name favicon.ico is available in the file system drive.

How to insert the Favicon in HTML file

1. Following are the steps for inserting the favicon.ico image in the HTML file:

Open the HTML file. Then use the following syntax to insert the favicon in the HTML file.

<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">

2. We have to use the above syntax in the tag of our html file. Then save the file.

3. Now. Open the HTML file in any browser. We can see the icon on the web page.

Example

<html>  

<head>  

<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">  

</head>  

<title> Example of favicon</title>  

<body>  

<br>  

<br>  

<p align="center">  

<img src="download.jpg">  

</p>  

</body>  

</html>

Output:

HTML favicon

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *