HTML CSS examples for HTML Tag:base
The target attribute sets the default target for all hyperlinks and forms in the page.
Value | Description |
---|---|
_blank | Opens the link in a new window or tab |
_self | Default. Opens the link in the same frame as it was clicked |
_parent | Opens the link in the parent frame |
_top | Opens the link in the full body of the window |
framename | Opens the link in a named frame |
The following code shows how to set a default target for all hyperlinks and forms on a page:
<!DOCTYPE html> <html> <head> <base target="_blank"> </head><!-- w ww . java 2 s . c o m--> <body> <p><a href="http://java2s.com">java2s.com</a> a link</p> </body> </html>