Open In App
Related Articles

How to add icon logo in title bar using HTML ?

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

In this article, we are going to learn how can we add an icon logo in the title bar using HTML. Most of the websites add icons or image logos in the title bar.

The icon logo is also called a favicon. Adding favicons is also considered to be good for the SEO of the websites. The favicon is a combination of favorite icons. The link attribute is used to add the favicon.

Preview Image:

Syntax:

<link rel="icon" href="icon_path" type="image/icon type">

Example: In this example, we are using the above written syntax in the head tag of html.

html

<!-- HTML code to add icon in the title bar -->
<!DOCTYPE html>
<html>
 
<head>
    <meta charset="utf-8" />
 
    <title>
        GeeksforGeeks icon
    </title>
 
    <!-- add icon link -->
    <link rel="icon" href=
          type="image/x-icon">
 
</head>
 
<body>
    <h1 style="color:green">
        GeeksforGeeks
    </h1>
 
    <p>
        GeeksforGeeks icon added in the title bar
    </p>
</body>
 
</html>

                    

Output:


Last Updated : 24 Nov, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads