How to add favicon in HTML?

favicon in HTML

  • A favicon is an image displayed before the title of web page.

  • <link> tag with attribute rel="icon" is used to add a favicon on the web page.


Syntax to add favicon:

<link rel="icon" type="image/x-icon" href="./favicon.ico">


Adding a favicon in HTML, example:

<!DOCTYPE html>
<html>
<head>
    <title> Geeks Help </title>
    <link rel="icon" type="image/x-icon" href="./favicon.ico">
</head>
<body>

</body>
</html>

Output:


favicon in HTML with an Example


Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.

Top Post Ad

Below Post Ad