open link in new window or tab html

hi friends welcome to 92tricks.tk
today i am going to give you a little tip
by using this tip you will be able to  make link html which open your link in new window or new tab



 <a href="92tricks.tk">92 tricks</a>
is a simple link html code

but when we click on this link browser redricet us on link in current tab



how to open link in new tab?


to open link in new tab just add target="_blank



so after editing your html code look like this
<a href="92tricks.tk" target="_blank">92 tricks</a>







how to open link in new window.?


to open link in new window not new tab you can use bellow html



<a href="http://92tricks.tk"  onclick="window.open('http://92tricks.tk', 'newwindow', 'width=500, height=300'); return false;"> 92tricks</a>


replace 92tricks.tk to your link you can also change window width and height

in above code i choose window height 300
and width 500
you can replace height and width


Post a Comment

0 Comments