How to add icon logo in title bar using HTML ?
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
<!DOCTYPE html>
< html >
< head >
< meta charset = "utf-8" />
< title >
GeeksforGeeks icon
</ title >
< 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
Share your thoughts in the comments
Please Login to comment...