I don’t expect probloggers or anyone with basic HTML knowledge to find this post particularly exciting but if you happen to be a new blogger with absolutely no idea on HTML coding, then you definitely need it. When you insert external links into your blog post, it might be just a way to drive your own visitors away to other sites without knowing. In blogger, the easy Compose mode allows you to insert external links inside your blog post but this link will open on that same page. There are two ways to prevent this from happening: using a certain HTML code while writing your blog posts or inserting a single line of code into your blog’s head section.
After inserting the link in compose mode normally, switch to Edit HTML mode and find the link you added.
Assuming you added a hyperlink as https://www.doncaprio.com with the anchor text being The 9ja Geek’s Journal, you should see this in Edit HTML mode:
<a href="https://www.doncaprio.com">The 9ja Geek' Journal</a>
To make this very link open in a new browser tab, edit it to look like this:
<a href="https://www.doncaprio.com" target="_blank">The 9ja Geek's Journal</a>
As you can see, you only need to add a space and the piece of code shown in red after the link in Edit HTML mode.
-Go to Design > Edit HTML
-Find this code:
<head>
-Right below it, paste this code:
<base target='_blank'/>
Now save your template. All links on your blog now opens in a new window/tab but I personally don’t like this method. I prefer the first one but the choice is actually yours.