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,

Updated on: 25-Feb-2020

2K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements