ข้อมูลอ้างอิงHTML

HTML โดยตัวอักษร HTML ตามหมวดหมู่ รองรับ HTML Browser แอตทริบิวต์ HTML HTML Global Attributes เหตุการณ์ HTML HTML สี HTML Canvas HTML เสียง/วิดีโอ ชุดอักขระ HTML HTML Doctypes การเข้ารหัส URL HTML รหัสภาษา HTML รหัสประเทศ HTML ข้อความ HTTP วิธี HTTP ตัวแปลง PX เป็น EM แป้นพิมพ์ลัด


HTML <link> ขนาดแอตทริบิวต์

❮ แท็ก HTML <link>

ตัวอย่าง

ไอคอนที่มีขนาดที่กำหนด:

<link rel="icon" href="demo_icon.gif" type="image/gif" sizes="16x16">

ความหมายและการใช้งาน

แอตทริบิวต์sizesระบุขนาดของไอคอนสำหรับสื่อภาพ

คุณลักษณะนี้จะใช้เฉพาะrel="icon"เมื่อ


รองรับเบราว์เซอร์

Attribute
sizes Not supported Not supported Not supported Not supported Not supported

ไวยากรณ์

<link sizes="HeightxWidth|any">

ค่าแอตทริบิวต์

Value Description
HeightxWidth Specifies one or more sizes for the linked icon.
The height and width values are separated by an "x" or "X".

Examples:

  • <link rel="icon" href="favicon.png" sizes="16x16" type="image/png"> (1 size)
  • <link rel="icon" href="favicon.png" sizes="16x16 32x32" type="image/png"> (2 sizes)
any Specifies that the icon is scalable (like an SVG image)

Examples:

  • <link rel="icon" href="icon.svg" sizes="any" type="image/svg+xml"> (any size)

❮ แท็ก HTML <link>