Computer >> Computer tutorials >  >> Programming >> CSS

How to set the favicon size in CSS rather than HTML attributes?


A favicon is a little icon visible on the web browser tab, just before the page title. It is generally a logo with the smaller size.

You cannot add the size using CSS. The standards do not support adding Favicon size using CSS. Let’s add it using attributes,

<link rel="icon" type="image/png" href="https://tutorialspoint.com/favicon-16x16.png" sizes="16x16">

The result after adding Favicon above will be,

How to set the favicon size in CSS rather than HTML attributes?