HTML Favicon


❮ Previous Next ❯

What is an HTML Favicon?

HTML Favicon is an image to display in the browser tab beside the page title.
<link> tag is used to add favicon images, it will be placed between <head> section of the HTML file.


Favicon Example
In the above image, the orange color logo in browser tab is favicon.
Favicon always seen before the title name of the HTML page.

Example

<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<h1> Favicon Example </h1>
</body>
</html>

link - Use to define the favicon.
rel - Use to define the relationship between the HTML page and the linked file.
type - Use to define type of image.
href - Use to link favicon image.