HTML <base> href Atribut
Contoh
Tentukan URL dasar untuk semua URL relatif pada halaman:
<head>
<base href="https://www.w3schools.com/images/">
</head>
Definisi dan Penggunaan
Atribut href
menentukan URL dasar untuk semua URL relatif pada halaman.
Dukungan Peramban
Attribute | |||||
---|---|---|---|---|---|
href | Yes | Yes | Yes | Yes | Yes |
Sintaksis
<base href="URL">
Nilai Atribut
Value | Description |
---|---|
URL | An absolute URL that acts as the base URL (like "http://www.example.com/") |
tag <dasar> HTML