Home >
Article > Web Front-end > How to use the `
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
The following are the attributes of the HTML
Both the href attribute and the target attribute, or both, must exist in the
S.No. | is:S.No. | Properties and Description |
---|---|---|
1 |
href Base URL |
|
2 |
Target Where to open the target URL − _blank - The target URL will open in a new window or tab. _self - the target URL will open in the same frame as it was clicked. _parent - The target URL will be opened in the parent frame _top - The target URL will be opened in the top frame, i.e. the full body of the window. |
<base herf= “base link…” target= “value”/>
The following is an example of using the
<!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="How to use the `<base>` tag to define the base URL of an HTML page?" > </body> </html>The Chinese translation of
Another example of using the
<!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="How to use the `<base>` tag to define the base URL of an HTML page?" > </body> </html>
The above is the detailed content of How to use the `