The structure of your Document is wrong, the recommended is that the tags <link>
, <title>
and <meta>
must be inside the <head>
Ex:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Biografia - João da Silva</title>
<meta charset="utf-8">
<link rel="shortcut icon" href="favicon.ico">
</head>
<body>
</body>
</html>
Imagery
For the image to load it is enough that it is in the root of the directory in which the file is also .HTML
Thus the href
of your Favicon
would look like this: href="favicon.ico"
, because it is at the same root as the .html
Saving it in the same directory as the index page of the site, save in format .ico
(most browsers will support favicons in more common formats like .gif
or .png
, but using ICO format will ensure that it works as well as Internet Explorer 6 .)
Source: You can read more in this Mozilla documentation: https://developer.mozilla.org/en-US/docs/Aprender/HTML/Introducao_ao_HTML/The_head_metadata_in_HTML#Adicionando_%C3%ADcones_personalizados_ao_seu_site
It is indicated that the image is in the same part as the .html
as said, but if you want to put in another folder this question will help you solve the problem: Path to access html folders ,css,php etc
you want to show the image in the browser tab or on your page?
– Tales Peres
want to show on tab
– Gabriel da Silva Santos
tries to give a
Ctrl + F5
on your page to see if it appears– Tales Peres
Your image has to be in the same folder as your . html, then just put the tag
<link rel="icon" href="favicon.png">
within thehead
. And check if the image extension is even . PNG or something else– hugocsl
Which browser is using?
– Leandro Angelo
to using Chrome and Firefox Leandro.
– Gabriel da Silva Santos
Hugo I haven’t put the head yet, is that why the image is already in the same folder
– Gabriel da Silva Santos
Gabriel read the answer below, she will help you solve this
– hugocsl