The little icon that sits before the tab title text is called a favicon. A favicon can be in png or ico format, with png being supported by all browsers except early IE versions. 16×16, 32×32 or 48×48 are popular dimensions, since the favicon is always kept at a small-scale you don’t need to go big as this may cut into loading times.
To have a favicon for your website have your logo or icon in png or ico format and include this code in the <head> section on each page you want to have the favicon:
<link rel="icon" href="https://website.com/img/favicon.png">
Remember to change the href to your website, folder and favicon name.