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/
<head> element.<link rel="icon" type="image/png" href="..."> inside <head>.<html> <head> <title>AIT - Academy of Information Technology</title> <link rel="icon" type="image/png" href="AIT.png"> </head> <body> <h1>Welcome to AIT</h1> <p>Learn HTML, CSS, JavaScript, and more at the Academy of Information Technology.</p> </body> </html>
Learn HTML, CSS, JavaScript, and more at the Academy of Information Technology.
<link> tag connects the external icon file with the webpage, while rel="icon" tells the browser to render it on the browser tab next to the page title.