When you click a link on a webpage/blog page, it usually opens on the same page of your blog browser. In most cases, you may have more than one links on the same post which when clicked, still open on the same browser replacing the one that you had opened previously.
To open a link/hyperlink into a new window, you simply; target="blank" attribute to your URL. Let say for example here is your code:
<a href="Url here"> text </a>
This is the code of the hyperlink (anchor text) that is opening to the same page of your blog browser.
To change the code to open to a new window, you will include _’blank’ attribute to the new code and your code will look something like this;
<a href="Url here" target="_blank"> text </a>
<a href="Url here" target="_blank"> text </a>
This is all you need to open your hyperlinks to a new window. Just insert the target="_blank" attribute on all links that you would like to open in a new tab/browser.
0 comments:
Post a Comment