A favicon (short for "favorite icon") is a small icon that appears in the browser tab, bookmarks, and shortcuts. It helps users visually identify your website.
Include the following <link>
tag inside the <head>
section of your HTML document:
<head> <title>My Website</title> <link rel="icon" type="image/x-icon" href="favicon.ico"> </head>
favicon.ico
and placed in the root directory..png
, .svg
, or .gif
formats, but .ico
is the most universally supported.<link rel="icon" type="image/png" href="favicon.png">
Save the favicon in the same folder as your index.html
file to avoid broken paths.
For full support on all devices and platforms, generate a favicon set using: https://realfavicongenerator.net/