Open In App
Related Articles

How to add icon logo in title bar using HTML ?

Improve Article
Improve
Save Article
Save
Like Article
Like

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:

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 24 Nov, 2023
Like Article
Save Article
Previous
Next
Similar Reads
Complete Tutorials