Learn HTML step-by-step from A to Z or improve your professional skills.  Home HTML and CSS Tutorials Opening a New Browser Window
Your Ad Here

Opening a New Browser Window


Opening a New Browser WindowTo get a link to open in a new browser window, what you do is add the target="_blank" attribute to your link tag, like this:

<A HREF="http://www.pageresource.com/linkus.htm" target="_blank">
Link to us!</A>

This will give you the following link:

Link to us!

Go ahead and click on it. Your browser will open a new window with my reciprocal links page in it. You will need to close the window when you are finished. Use the "close" option rather than the "exit" option, because the "exit" option will make you exit your browser entirely!

You can try it with an image as well:

<A HREF="http://www.pageresource.com/linkus.htm" target="_blank">
<IMG SRC="http://www.pageresource.com/images/scare.jpg">
</A>

Now you have the clickable image:

image 1

There is also a way to do this using JavaScript, which gives you more options on the appearance of the new window. If you are interested, go to the section Opening a New Window with JavaScript.



Author's URL: John Pollock
Thank you for voting.
Rate this Materials:
Bad 
1 2 3 4 5 Excellent
print this page subscribe to newsletter subscribe to rss

HTML is Hyper Text Markup Language that is used to make hypermedia and hypertext documents for the Web. More HTML and CSS: Most Popular Materials | Fresh Materials | More HTML Tutorials at Markuptutorials.com

Add comments to "Opening a New Browser Window"

Only registered users can write comment

No comments yet...