How to make links to open in a target frame

To make links in a web page to open in a target frame or new window all you need is to add target=”_blank” in between the section of the html code, where *** is the default target frame.

target=”_blank” Opens a page in new window
target=”_self” Opens a page in the same frame
target=”_top” Opens a page in the top page breaking all frames
target=”_parent” Opens a page in parent frame

We can also use target=”frame or iframe’s name” to make the link to open in that frame or iframe.

To make links to open in a target frame or new window by default add in between the section of the code. This also works for Blogger’s templates, for Blogger Beta’s templates since it had to be XML compliant you have to add the closing tag at the end to to make it work.

11 thoughts on “How to make links to open in a target frame”

  1. I like your site. It has a lot of valuable information. I am relatively new to this blog thing. Please visit my site and give me so suggestions. I could use them. I really would appreciate it. Have a nice weekend.

  2. Hey, is there a way to make a hyperlink open two different pages in two seperate iframes?

    Like say I one frame was to show a title like GRAPHIC ART (title.htm) and the other was the body of that (body.htm), is it possible if I had a third frame that was a navigation menu and when I clicked on GRAPHIC ART link in that frame it would open the requested pages on the other two frames?

  3. I have some problems with the target links. I have a html page with 3 frames (left, top, and main), my navigation is on the topframe which I created in flash. When I click the button instead of going to the targeted link, it goes to another link. What happened? Can anyone help me plz?

  4. I made a page with frames. Generally I try to avoid doing so, but it was the only thing that made sense in this case. To the point:

    The main frame contains two sub-frames: a menu frame, and a content frame. After creating these I realized they would not be centered if viewed on a large monitor, so I threw the whole frameset into an iframe and centered the iframe. Looks great on Safari, but FireFox seems to now disregard targets and open links in new tabs instead of the specified frame. What gives?

  5. ohh sorry I pasted code but that is html code na the browser rendered that gmail link is made by my code even that is good ref for u click on that you will get to know the behaviour of the code

  6. firefox will open it up in a new tab instead of in the frame reson for this is because there is a option in firefox where u can tell it to open all new links into tabs.

  7. I want all links to open in iframe. This words for comments, but clicking on new post expand on whole window instead of inside of iframe. I tried putting everywhere target=’_self’, including base target. Firefox options offers me only to open all new links into tabs or windows, no frames are offered.

    Any help will be highly appreciated.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: