HTML Favicon Icon

A favicon is a small picture that shows up in the browser tab next to the name of the page.

How to Put a Favicon on an HTML Page

You can make your favicon out of any picture you want. You can also make your own favicon on sites like https://www.favicon.cc.

Tip: Since a favicon is small, it should be a simple, high-contrast image.

A favicon is a small image that shows up to the left of the page name in the browser tab.

A Picture of a Favicon

 

\"fav

To add a favicon to your website, either save the image to the root directory of your webserver or make a folder called imgin the root directory and save the image there. \”favicon.ico\” is a common name for a file with a favicon.

After the <title> element, add a <link> element to your \”index.php\” file, like this:

Example

<!DOCTYPE html>
<html>
<head>
<title>Your Page Title</title>
<link rel=\”icon\” type=\”image/x-icon\” href=\”/img/favicon.ico\”>
</head>
<body>

<h1>Your Heading</h1>
<p>Your paragraph.</p>

</body>
</html>

 

Favicon File Format Support

The supported file formats for favicon images are displayed in the following table:

BrowserICOPNGGIFJPEGSVG
EdgeYesYesYesYesYes
ChromeYesYesYesYesYes
FirefoxYesYesYesYesYes
OperaYesYesYesYesYes
SafariYesYesYesYesYes
Related Article
Introduction to HTML

HTML Introduction – Learn the Basics of HTML HTML is the starting point of web development. Every website you see Read more

What is HTML

What Is HTML – Complete Beginner Explanation HTML is the foundation of the web. Every website you visit, from simple Read more

HTML Basic Examples

HTML Basic Examples – Learn HTML by Practice The best way to learn HTML is by writing and testing simple Read more

HTML text Editors

HTML Text Editors – Learn How to Write HTML Code To write HTML code, you need a text editor. A Read more

HTML Tags

HTML Tags are the basic units used to create HTML elements.They define how content is displayed in a web browser. Read more

HTML Elements

HTML Elements are the building blocks of every web page.Each element defines a part of the webpage, such as headings, Read more

HTML Attributes

HTML Attributes provide additional information about HTML elements.They help control how elements behave, display, or store extra data. In this Read more

HTML Headings

HTML Headings are used to define titles and subtitles on a web page.They help organize content and improve readability for Read more