HTML CSS examples for HTML Tag:base
The href attribute specifies the base URL for all relative URLs on a page.
Value | Description |
---|---|
URL | An absolute URL that acts as the base URL (like "http://www.example.com/") |
The following code shows how to Specify a base URL for all relative URLs on a page:
<!DOCTYPE html> <html> <head> <base href="http://java2s.com/resources/"> </head><!--from w w w . ja v a 2 s .c o m--> <body> <p><img src="a.gif" width="24" height="39" alt="message"></p> </body> </html>