Specify Where to Open the Link - Current Page/ Frame or the Other Ones

Written by @m_k_amin 10 December 2012

There are links in all websites, but the problem is that when the visitor of our website clicks on the link, where the new page should be shown to us? In a new tab? In a new Windows? Or shown in an iframe? The following code shows all these modes to make the best choice for links in the websites.

Code Snippet:

                                                
                                                <!-- this script is provided by www.htmlfreecode.com coded by: Kerixa Inc. -->
Click here to open the link in the<br>
<a href="http://htmlfreetutorial.com/" target="_top"  >Main Page</a><br>
<a href="http://htmlfreetutorial.com/" target="_parent" >Parent Frame</a><br>
<a href="http://htmlfreetutorial.com/" target="_blank" >New Page</a><br>
<a href="http://htmlfreetutorial.com/" target="_self" >Current Frame</a><br>
<a href="http://htmlfreetutorial.com/" target="Frame1" >Frame 1</a><br>
<iframe id="Frame1" name="Frame1" style="height: 50px"></iframe><br>

<br><font face="Tahoma"><a target="_blank" href="http://www.htmlfreecode.com/"><span style="font-size: 8pt; text-decoration: none">HTML Free Code</span></a></font><a target='_blank' href='www.htmlfreecode.com' style='font-size: 8pt; text-decoration: none'>Html Free Codes</a>                                                
                                            

Example:


About @m_k_amin

This user is pending a biography.

M

Comments


Here you can leave us commments. Let us know what you think about this code tutorial!

0 / 300

TRENDING POST
1
2
3
4
5
VISITORS
Online Users: 12
Recent Members: Prashanthcs11, Designer Diva, Jirgensons E, vamsi, wapmohin
advertisement 2