How To Add A Favicon

Table of contents:

How To Add A Favicon
How To Add A Favicon

Video: How To Add A Favicon

Video: How To Add A Favicon
Video: How to Add a Favicon 2024, May
Anonim

Favicon (Favorite Icon) is a 16-pixel square icon that the browser of the site page visitor displays in the address bar. If the page is added to favorites, the picture will be displayed there as well. In addition, the favicon appears in the search list of Yandex sites. All this in combination can be very useful for drawing attention to the site.

How to add a favicon
How to add a favicon

Instructions

Step 1

Create an icon, the link to which will need to be placed in the pages of the site. Any graphic editor is suitable for this. Use a 16 by 16 pixel size - some browsers can handle large icons, but it's best to reach as many web surfers as possible.

Step 2

Save the prepared image in ico format. Modern browsers will be able to understand favicons in files with the extension gif, png, bmp, etc., but to cover the maximum number of browser modifications, it is better to use the native icon format of this type. If your graphic editor does not support the ico format, then you can save it, for example, in.

Step 3

Upload the icon to the server of your site and save it to a file named favicon.ico - this name is understood by all browser modifications in the same way, although the name is not important for some of them. If the page code does not contain the address of this file, then browsers and search robots by default look for it in the root folder of the site, so it is best to place the file there.

Step 4

Insert HTML tags into the source code of the pages indicating the uploaded file. For Internet Explorer, this tag should look like this:

For other browsers it should be written differently:

Add both lines to ensure cross-browser compatibility. If the file was placed in a folder other than the root folder, specify the full path to the location in the href attribute. These lines should be inserted into the heading part of the web document, that is, between the and tags.

Recommended: