DEV Community

Cover image for How to Add a Browser Tab Icon to Your Websites!
Karina Pichardo
Karina Pichardo

Posted on

8 2

How to Add a Browser Tab Icon to Your Websites!

Adding an icon to the browser tab of a website you created is like the cherry on top! The best part about it, is how incredibly simple it is to add one.

browser displaying browser tab icons

1. Find an image which you'd like to use as your favicon.

2. Save the image inside the folder which contains all your website's files. (index.html, styles.css, scripts, images, etc.)

3. Similar to how you link your external CSS stylesheet, in the <head> section of your HTML document, you do the exact same to link the icon, however, for the relationship you add 'icon' and for the href you'd add the image's location, for example:


 rel="icon" href="images/example.png">

Enter fullscreen mode Exit fullscreen mode

Tada! It's really that easy.

I know it's something so subtle but I still get excited every time I get to put an icon on the browser tab of a website I created.

My favorite website to find icons is:
https://freeicons.io/

Hope this helps, Happy coding!

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Best practices for optimal infrastructure performance with Magento

Running a Magento store? Struggling with performance bottlenecks? Join us and get actionable insights and real-world strategies to keep your store fast and reliable.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️