Creating favicon and using in WordPress

What is a favicon?
A favicon (short for “favorites icon”) is an icon associated with a particular website. To have a little icon ( 16px ) that will appear next to the web address at the top of the page, you need to use an .ICO icon format image.

You can create a favicon by using any graphics/image editing software or online favicon maker websites such as:

After generating a favicon you should upload the file to your site. Then include the following code in the head of your HTML document if this is HTML website if it is php WordPress site then put the code into header.php file.
So you can upload a 16 x 16 px image that will represent your website’s favicon.
Some professional WordPress themes come with their own setting, there you might find favicon upload button, all you have to do, upload your own favicon image there.
If you do not have that, then follow these steps:

Login to your site. On your admin dashboard Click on Appearance.
Then, Click on (Theme) Editor.
Select the file called Header or header.php to edit the file.

Put the favicon code there. Remember in order to work first you need to upload your icon to your site.

<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<link rel="icon" href="/favicon.ico" type="image/x-icon">
 Here is my 16px favicon with pale blue background  16px favicon