كيفية إضافة favicon في HTML

ثلاثة وسوم تُغطّي 99% من الحالات. وسمان إضافيان يمنحانك إعدادًا بمستوى PWA كامل.

3 دقيقة قراءة

تحقق من أيقونات أي موقع

ثبّت إضافة FetchFavicon لمتصفح Chrome لاستخراج الأيقونات ومعاينتها والتحقق منها فورًا.

تثبيت إضافة Chrome

الوسم الأساسي

<link rel="icon" href="/favicon.ico"> — هذا كل شيء. كل المتصفحات ستجلبه.

المجموعة الحديثة الموصى بها

أضف SVG وapple-touch-icon لعرض حاد على كل المنصّات:

<link rel="icon" href="/favicon.ico">

<link rel="icon" type="image/svg+xml" href="/favicon.svg">

<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">

محفّز تثبيت PWA

أضف manifest.json يحتوي إدخالات PNG بمقاسي 192×192 و512×512، ثم اربط <link rel="manifest" href="/site.webmanifest">.

الأسئلة الشائعة

What is the minimum HTML tag for a favicon?

Add <link rel="icon" href="/favicon.ico"> inside <head>. Place favicon.ico at your site root and every browser will find it.

Do I need separate tags for PNG and SVG favicons?

Yes for a modern setup. Link favicon.ico as the fallback, then add <link rel="icon" type="image/png"> and optionally type="image/svg+xml" for sharper rendering.

Where should favicon <link> tags go in HTML?

Inside the <head> element, before </head>. Order among icon links does not matter.

Do I need a web manifest for favicons?

Not for basic tabs, but add <link rel="manifest"> plus 192×192 and 512×512 PNG icons if you want PWA install prompts.

أدلة ذات صلة

جرب الأدوات

متابعة القراءة