EN
HTML - set web page favicon
3 points
In this article, we would like to show you how to set web page favicon in HTML.
Quick solution:
for *.ico
file:
xxxxxxxxxx
1
<link rel="icon" type="image/x-icon" href="https://example.com/favicon.ico" />
for *.png
file:
xxxxxxxxxx
1
<link rel="icon" type="image/png" href="https://example.com/favicon.png" />
In order to set web page favicon, you need to specify a link
element with the href
attribute containing path to the new favicon.ico
file and put the link
inside head
section.
xxxxxxxxxx
1
2
<html>
3
<head>
4
<link rel="icon" type="image/x-icon" href="https://example.com/favicon.ico" />
5
</head>
6
<body>
7
<div>Some div element on the web page...</div>
8
</body>
9
</html>