Links are those figures (text, numbers, symbols or graphics) when clicked jumps into another page. Simply we can call it a hyperlink that connects a page to another. You might have noticed that some links open in same page when clicked and other open in new page. But you might be thinking why I am writing this rubbish for blog, isn't it? But know one thing that they are very important because when you make link to open in new tab, visitors delay to leave your page and will probably make them stay longer.
Blogging SentralWe can use links in Html too by the name anchor. Anchors are represented by <a> tag. But to open in new tab/window “target” should be used. So shall we begin?
Making Links To Open In New Tab/Window
It is very easy as well. Here we will add just the target tag.
A link that opens in the same window looks like this in Html;
<a href="http://bloggingsentral.blogspot.com">Blogging Sentral</a>
In browser it looks like this;
But when you make the link to open in new tab the code is like this;
<a href="http://bloggingsentral.blogspot.com target"_blank">Blogging Sentral</a>
In browser it look like this;Both the links look same but they have different attributes. If you click the above link it will open in same tab but if you click this link it will open in new tab. If you click it 5 times it will open just thrice.
ALTERNATIVELY
We can make link to open in new window or tab by using MyNewWindow attribute instead of _blank .In Html it will look as the one below;
<a href="http://bloggingsentral.blogspot.com" target"MyNewWindow">Blogging Sentral</a>Blogging Sentral
You see the link above ya. Try clicking it. If you click it a dozens of time also it will open just a single time.
MAKING THE LINK TO OPEN IN NEW TAB/WINDOW AS DEFAULT
So do you like this idea. If yes then you might want all of your links to be open in new tab/window as default. Applying the above code one by one takes much time. SO what will you do? Here's the solution for it;
- Sign in to your blogger account.
- Click on design/Template.
- Then be forwarded to Edit HTML.
- Now find the </head> tag (you can press Ctrl+f) and paste the below code there;
<base target="_blank" />
- You can replace
_blankwithMyNewWindow. - Enjoy!
No comments:
Post a Comment