HTML <a> คุณสมบัติhreflang
ตัวอย่าง
แอตทริบิวต์ hreflang ระบุภาษาของเอกสารในลิงก์:
<a href="https://www.w3schools.com" hreflang="en">W3Schools</a>
ความหมายและการใช้งาน
แอตทริบิวต์hreflang
ระบุภาษาของเอกสารที่เชื่อมโยง
คุณลักษณะนี้จะใช้เฉพาะเมื่อ มีการ href
ตั้งค่าแอตทริบิวต์
หมายเหตุ:คุณลักษณะนี้เป็นเพียงคำแนะนำเท่านั้น
รองรับเบราว์เซอร์
Attribute | |||||
---|---|---|---|---|---|
hreflang | Yes | Yes | Yes | Yes | Yes |
ไวยากรณ์
<a hreflang="language_code">
ค่าแอตทริบิวต์
Value | Description |
---|---|
language_code | A two-letter language code that specifies the language of the linked document. To view all available language codes, go to our Language code reference. |
❮ แท็ก HTML <a>