How to add icon logo in title bar using HTML ?
Most of the websites adds icon or image logo in the title bar. The icon logo is also called as favicon. Adding favicons is also considered to be good for the SEO of the websites. The favicon is the combination of favorite icon.
The link attribute is used to add the favicon.
![]()
Syntax:
<link rel="icon" href="icon_path" type="image/icon type">
Example:
<!-- 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> |
chevron_right
filter_none
Output:
![]()
Recommended Posts:
- HTML | title Tag
- HTML | DOM Title Object
- HTML | title Attribute
- HTML | DOM title Property
- How to get the title of an HTML page ?
- HTML | DOM Title text Property
- How to style icon color, size, and shadow by using CSS ?
- CSS to put icon inside an input element in a form
- Bootstrap | Close Icon for dismissing content with Examples
- HTML Course | Structure of an HTML Document
- HTML | DOM HTML Object
- HTML Course | Basics of HTML
- HTML | th Tag
- HTML vs XML
- HTML | <hr> Tag
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



