Home » Programming » How to add or display favicon on a webpage?

How to add or display favicon on a webpage?

17 January 2009

What is favicon?

Favicon is shortcut of favorites icon, also known as website icon, shortcut icon, url icon, or bookmark icon.

On the graphical web browser, this icon locates on the Address bar and Tabs bar as seen in the screenshot below.

Screenshot of favicon

Screenshot of favicon

Add favicon

You required to have an image of 16x16 pixels, either PNG, ICO or GIF format

To display favicon to your webpage, add one of the following html code inside <head> depends on which image format you have.

<head>
<link rel="icon" type="image/x-icon" href="path/myicon.ico">
</head>

<head>
<link rel="icon" type="image/png" href="path/myicon.png">
</head>

<head>
<link rel="icon" type="image/gif" href="path/myicon.gif">
</head>

Author: Manet Yim Programming

1,515 views
  1. No comments yet.
  1. No trackbacks yet.