Favicon (Favorites Icon) หรืออาจจะเรียกกันว่า website icon, shortcut icon, url icon, หรือ bookmark icon ซึ่งจะมีขนาด 16x16 pixel ซึ่งจะแสดงอยู่ในตำแหน่งเดียวกันกับ Address Bar ดังภาพ
การสร้างรูป Favicon สามารถสร้างได้ 4 รูปแบบด้วยกัน คือ ICO, PNG, GIF และ JPEG ส่วนใหญ่แล้วเราจะใช้รูปแบบ ICO มากกว่า สำหรับการใช้งานในแต่ละรูปแบบมีดังนี้
HTML:
- <link rel="icon" type="image/vnd.microsoft.icon" href="http://example.com/image.ico">
- <link rel="icon" type="image/png" href="http://example.com/image.png">
- <link rel="icon" type="image/gif" href="http://example.com/image.gif">
XHTML:
- <link rel="icon" type="image/vnd.microsoft.icon" href="/somepath/image.ico">
- <link rel="icon" type="image/png" href="/somepath/image.png">
- <link rel="icon" type="image/gif" href="/somepath/image.gif">
Internet Explorer จะมีรูปแบบที่แตกต่างกันเล็กน้อย
- <link rel="shortcut icon" type="image/x-icon" href="/somewhere/myicon.png">
<link href='http://www.........../favicon.ico' rel='shortcut icon' type='image/x-icon'/>
ตำแหน่งในการวางการแก้ไข Favicon จะอยู่ถัดมาจาก pageTitle ให้วางลงไปที่ตำแหน่งนี้ได้เลยครับ
ไม่มีความคิดเห็น:
แสดงความคิดเห็น