Posts Learn Components Snippets Categories Tags Tools About
/

How To Add a Favicon to Your Website the Easy Way

In this short snippet, you will get to know how to add Favicon to your website the easy way to show an icon as an indicator that displays in your browser tab

Created on Jul 18, 2022

545 views

The favicon can be in any image format (ico, png, jpg) and the most recommended design and style of your website favicon is to have it look good on both light and dark theme colors.

Example of Favicon from Entertails.com

To add the favicon prepare an image at least around 32px in width and height and the format can be any image format. Once you have that ready you can add the following code in your "head" HTML tag.
<title>Your website title here</title>
<link rel="shortcut icon" type="image/jpg" href="your-favicon-here.jpg"/>
Do note on the type of the image. For the above code it's jpg but you can also have ".png" format and you can define it like below.
<link rel="icon" type="image/png" href="your-favicon-here.png">
An example of .png favicon is PostSrc favicon.
<link rel="icon" type="image/png" href="https://postsrc.com/favicon.png">

Mobile Favicon View


The mobile favicon will look like the following.
Entertails.com Mobile Tab Favicon Preview

If you like our tutorial, do make sure to support us by being our Patreon or buy us some coffee ☕️

)