HTML <base> คุณสมบัติhref
ตัวอย่าง
ระบุ URL ฐานสำหรับ URL ที่เกี่ยวข้องทั้งหมดบนหน้า:
<head>
<base href="https://www.w3schools.com/images/">
</head>
ความหมายและการใช้งาน
แอตทริบิวต์href
ระบุ URL ฐานสำหรับ URL ที่เกี่ยวข้องทั้งหมดบนหน้า
รองรับเบราว์เซอร์
Attribute | |||||
---|---|---|---|---|---|
href | Yes | Yes | Yes | Yes | Yes |
ไวยากรณ์
<base href="URL">
ค่าแอตทริบิวต์
Value | Description |
---|---|
URL | An absolute URL that acts as the base URL (like "http://www.example.com/") |
❮ แท็ก HTML <base>