Nền (Base)
Chức năng
editThẻ lệnh HTML dùng để khai báo nền chung cho Kiểu Chử , Khung hiển thị và Liên kết
Kiểu Chử <base Font="Tham Số"> Khung hiển thị <base Target="Tham Số"> Liên kết <base Href="Tham Số">
Cú pháp
edit- <base Font size=+2 face=Arial color=Blue></base>
- <base Target=newwin></base>
- <Base Href=http://www.yahoo.com/></base>
Tham số
editKiểu chữ
Khung hiển thị
Liên kết
Thí Dụ
edit<!DOCTYPE html> <html> <head> <base href="https://www.w3schools.com/images/" target="_blank"> </head> <body> <p><img src="stickman.gif" width="24" height="39" alt="Stickman"> - Notice that we have only specified a relative address for the image. Since we have specified a base URL in the head section, the browser will look for the image at "https://www.w3schools.com/images/stickman.gif".</p> <p><a href="https://www.w3schools.com">W3Schools</a> - Notice that the link opens in a new window, even if it has no target="_blank" attribute. This is because the target attribute of the base element is set to "_blank".</p> </body> </html>