The Wayback Machine - https://web.archive.org/web/20240813234204/https://www.geeksforgeeks.org/how-to-add-icon-logo-in-title-bar-using-html/
Open In App

How to add icon logo in title bar using HTML ?

Last Updated : 25 Jun, 2024
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

Adding an icon logo in the title bar, commonly known as a favicon, is a simple yet effective way to enhance website recognition and SEO. This small image or icon appears next to the webpage title in the browser’s tab, helping users quickly identify and differentiate between multiple open tabs. By using the <link> tag with the rel attribute set to “icon” and href pointing to the icon file, you can easily display the favicon in the browser tab alongside the title.

Preview Image:

icon logo in title bar using HTML

How to Add a Favicon in HTML

To add a favicon, use the following syntax in the <head> section of your HTML document:

Syntax:

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

Example: This example demonstrates how to add a favicon to your webpage by including the appropriate syntax in the <head> tag of your HTML document.

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=
"https://media.geeksforgeeks.org/wp-content/cdn-uploads/gfg_200X200.png"
            type="image/x-icon"
        />
    </head>

    <body>
        <h1 style="color: green">
            GeeksforGeeks
        </h1>

        <p>
            GeeksforGeeks icon added in the title
            bar
        </p>
    </body>
</html>

Output:

adding icon logo in title bar using HTML

Adding a favicon to your webpage is a straightforward process that significantly enhances user experience and website recognition. By including a simple <link> tag in the <head> section of your HTML document, you can ensure that your favicon appears in the browser tab, making it easier for users to identify your site among multiple open tabs.


Previous Article
Next Article

Similar Reads

Instagram Logo/Icon using HTML and CSS
An animated representation of the Instagram logo using HTML and CSS is displayed as a colorful circular shape with a radial gradient background. Hovering over the logo triggers a subtle upward movement. The white highlights and the text "Instagram Logo" add to the visual appeal and provide context. The project showcases a visually appealing and int
3 min read
How to align a logo image to center of navigation bar using HTML and CSS ?
The navigation bar is an essential component of a website that helps users to navigate between different pages. It is usually located at the top of the page and consists of a list of horizontal links, logos, and other elements. The alignment of logos can be adjusted using CSS. In this tutorial, we will focus on how to align the logos to the center
2 min read
Create an Icon Bar using HTML and CSS
This article provides a complete idea of how to create an Icon Bar using HTML and CSS. HTML is used to design the structure, and CSS applies styles to the elements to make the user interface (UI) attractive. To add the Icons, we use the Font Awesome icons CDN link in the head section, and add the icons code in body section. Example 1: Here, we crea
2 min read
How to create Icon-only positioning icon using jQuery Mobile ?
jQuery Mobile is a web based technology used to make responsive content that can be accessed on all smartphones, tablets and desktops. In this article, we will be making Icon-only positioning icon using jQuery Mobile. Approach: First, add jQuery Mobile scripts needed for your project. &lt;link rel=”stylesheet” href=”http://code.jquery.com/mobile/1.
1 min read
How to replace dropdown-toggle icon with another default icon in Bootstrap ?
Bootstrap provides the option of adding a dropdown to our websites. The default icon on the dropdown button is the 'downward solid arrow' logo. Even though it serves its purpose, most of the modern-day websites nowadays use Bootstrap. Therefore, the icon might look very generic to the visitor.Program: C/C++ Code &amp;lt;!DOCTYPE html&amp;gt; &amp;l
3 min read
React Suite Icon &lt;Icon&gt; Props
React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. There is a lot of data that gets rendered on a web page. Sometimes we require to represent data using icons. This is when the Icon component allows the user to add icons to your application. Icons are commonly u
3 min read
How to Add Custom Logo to WordPress Website ?
Logos are the brand identity that represents the whole brand or company. Adding a custom logo to your WordPress website can make a big difference in how your site looks and feels. A custom logo helps to brand your website and make it stand out. Many website owners want to know how to add a custom logo to their WordPress website because it's a simpl
5 min read
How to Add a Logo to the React Bootstrap Navbar ?
In this article, we will see how to add the Logo to the Navbar using React Bootstrap. The Navbar or Navigation bar is one of the most important UI components for dynamic and single-page applications. The navbar provides a better user experience and navigation over different components. In this navigation bar, we can perform different customizations
3 min read
Create GeeksforGeeks logo using HTML and CSS
Creating a logo using HTML and CSS involves designing graphical elements with HTML tags, styling them using CSS properties such as colors, sizes, and positions, and possibly incorporating SVG graphics or images. This approach allows for custom, scalable, and interactive logo designs on web pages. GeeksforGeeks is an online study platform and we wil
2 min read
How to initialize a dialog without a title bar ?
The task is to initialize a dialog without a title bar. In this article, we will see how to initialize the dialog box without any title bar. A Dialog box is used to provide information in a particular way on the HTML pages. It creates a small window that is protected from the page content. If you want to change its size, color, or any other stuff t
2 min read
three90RightbarBannerImg