Sometimes, we want to put a website’s logo to be the icon image in browser tabs with HTML.
In this article, we’ll look at how to put a website’s logo to be the icon image in browser tabs with HTML.
How to put a website’s logo to be the icon image in browser tabs with HTML?
To put a website’s logo to be the icon image in browser tabs with HTML, we add a favicon.
For instance, we write
<head>
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
</head>
to add a link element.
In it, we set the href attribute to the URL for the favicon.
And we set the rel attribute to shortcut icon
and type to image/x-icon
to let the browser know that favicon.ico a favicon.
Conclusion
To put a website’s logo to be the icon image in browser tabs with HTML, we add a favicon.