In HTML, different elements have attributes that contain link to the other resources. The values of these attributes are URL’s, these can be absolute or relative URL’s.
The
#以下是HTML
必須在
S.No. | 的中文翻譯為:S.No. | 屬性和描述 |
---|---|---|
1 |
href #基本URL |
|
2 |
目標 #在哪裡打開目標URL − _blank - 目標URL將在新視窗或選項卡中開啟。 _self - the target URL will open in the same frame as it was clicked. _parent - 目標URL將在父級框架中開啟 _top - 目標URL將在頂部框架中打開,即視窗的完整主體。 |
<base herf= “base link…” target= “value”/>
#以下是使用HTML中的
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="description" content="meta tag in the web document"> <meta name="keywords" content="HTML,CSS"> <meta name="author" content="lokesh"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- Declaring the BASE URL --> <base href="C:\Users\LOKESH BADAVATH\OneDrive\Desktop\TUTORIAL'S POINT\images\"target="_blank"/> </head> <body> <img src="https://www.tutorialspoint.com/static/images/logo-color.png" / alt="如何使用`<base>`標籤來定義HTML頁面的基本URL?" > </body> </html>
使用
<!DOCTYPE html> <html> <head> <title>HTML base Tag</title> <base href = "http://www.tutorialspoint.com" /> </head> <body> HTML: <br><img src = "https://tutorialspoint.com/images/html.gif" / alt="如何使用`<base>`標籤來定義HTML頁面的基本URL?" > </body> </html>
以上是如何使用`