HTML - Favicon

HTML Favicon

Favicon is a small image that appears along side with the page's title in the browser tab.
In this tutorial, I will be showing you how to add a favicon to your website pages.

favicon

Adding Favicon

  • The <link> tag is used to add the favicon
  • It takes the following major attributes:
    • href contains the address of the image. images/favicon.ico
    • type defines the media type of the linked document/resource. image/x-icon
    • rel defines the relationship between the linked resource and the current document. icon

Now try it out yourself, you can use any image of your choice. Below is an example that you can copy and use.

Example

note
NOTE:

You can also use jpeg, svg, gif and png image formats. But the icon image format is the commonly used, when it comes to favicon

ADVERTISEMENTS

LEARNING IS A CONTINOUS PROCESS - PRACTICE MAKES PERFECT