Anchor Links and Mail To Links ~ The Blog Doctor.

Anchor Links and Mail To Links

New Visitor? Like what you read? Then please subscribe to my Blog Feed or sign up for Free Email Updates. Thanks for Visiting!

Anchor Links are used to jump directly into a specific section on a page, instead of letting the user scroll around to find what he/she is looking for......

Anchor Links are mainly used in making FAQ (Frequently Asked Questions)type pages. Such pages contain a list of FAQs at the top and detailed answers to each question at the bottom. Clicking on each question makes the page shift directly to the question and its answer at the bottom.

The question at the top has its link made by the following code :

<a href="#Q4">FAQ 4. How to login to Dashboard at Blogger?</a>

This code will make the following Link :

FAQ 4. How to login to Dashboard at Blogger?

The target is coded with following code:

<a name="Q4">FAQ 4. How to login to Dashboard at Blogger?</a>

Clicking on this link will jump you to the Question and Answer at the bottom of this page.


To make an anchor Link which connects/jumps to a specific location on another page use this code :

<a href=" THE LINK">

The above code will produce the following link :


NOTE : I have already coded in


on that target page and saved it.


To make your links open in a separate window use this code :

<a href=""
target="_blank">Visit Dummies Guide to Google Blogger (Beta)</a>

This will produce the following link :

Visit Dummies Guide to Google Blogger (Beta)

Try clicking on the above link to see if it opens in a new window. If you want your links in the New Blogger to open in a new window you can paste the code for each link as above in a Html/Javascript Page Element and save.

To do this in a Link List Widget go to Template------->Edit Html------>First Backup Template

Then put a check in Expand Widgets Template text box and scroll down in Edit Template text box till you come to the Link List Widget code :

<b:widget id='LinkList1' locked='false' title='Links' type='LinkList'>
<b:includable id='main'>
<b:if cond='data:title'><h2><data:title/></h2></b:if>
<div class='widget-content'>
<b:loop values='data:links' var='link'>
<li><a expr:href='' target='_blank' ><></a></li>
<b:include name='quickedit'/>

Insert the code in black in the above code. Save Template. This will open all the links in this section in a new window.


To make a mail to link use this code in your post or Html/Javascript Page Element :

<a href="">
Send Mail</a>

Change to your email address. This will show on your page like this :

Send Mail

Your Email Address maybepicked up by spam bots so make a graphical link at this site :

Upload gif to Googlepages and copy theurl
Paste it in blog layout in a html/javascript element

<img width="96" src="URL of UPLOADED GIF" height="64"/>

See How it appears :

The Target Link produced is :

FAQ 4. How to login to Dashboard at Blogger?
Answer : To login to theDashboard goto and type inyour Username and Password and hit Enter.

Technorati Tags:, ,



Everytime I try to use your sugesstion about how to get links from my link lists to open in a separate window I get this error message when I try to save my template.

Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly.
XML error message: Element type "a" must be followed by either attribute specifications, ">" or "/>".

What am I doing wrong?

vin said...


Look for

<a expr:href='' target='_blank' ><></a>

See that </a> is present at the end of any line starting with <a href....> as in above code.

Usiku (oo-SEE-koo) said...

This is a very concise and useful post that combines the basics of linking. Thanks.

Melody said...

OK, I swear I've looked over my html 20 times and I cannot find this section. Can you give me a clue as to what is before and after this section? My eyes are going nuts...


vin said...


Can you give me more details on what you are trying to do?......or what you are trying to find? :-)

Melody said...

That might be helpful, huh? I really shouldn't post comments at 1:45am! LOL

I want to links to open in a new window. I was trying to fix the html in my 'edit template' like you suggested, but could not find the Link List Widget to add the code to.

Can you tell me what comes before and after it so that I can find it? I swear its not there! lol

THanks again, tons!

vin said...


Put a check in the Expand widgets template box at the top of the Template code box on Edit Html subtab of Template tab.

This will expand the Link List widget code.

Melody said...

Vin, first I would like to thank you for all of your help ... second, I apologize for my lack of vision with this. I had clicked on 'expand widget template' and did it again today. I just can't find that section of the html ... even after looking for 30 minutes. Could you tell me what widget is before and after the linklist one so that I can spot it better?

Again, thank you SO much!

vin said...


What is your blog address?

Melody said...

again, thank you for all of your help.

the address is

vin said...


You have not added a Link List widget to the sidebar. To add one see :

How to Add Widgets

Melody said...

I bet by now you're ready to hit me over the head!!! I'm sorry I'm such a newbie!

OK, quick question. I'm trying to get adsense on my page and waiting for the approval process. Will this code affect adsense? I've read that you cannot have adsense open in a new page so I would hate to go against their rules then. Just read about this last night.

Thanks again TONS!!

Melody said...

Its me again ... the major blogspot dumb dumb who keeps you working your tail off....

So, I added the Link List, but I kept it blank. I added the code, but the links on my page are still opening in the same page. Does this code only work for the links in the link list or will it work for links in my posts? I need it mainly for the links in my post since I add tons of them.

Again, a million thanks...

vin said...


I believe you can customize your Adsense Ads. before they give you code to copy and paste in your blog. See :

How to add Adsense to Blog

The code to open links in a new window is for Link List widgets and not for Adsense widgets.

vin said...


For your in post links you will have to add target='_blank' in the link code for each link by clicking on Edit Html tab of Post Editor and altering the code.

The code in the Link List widget does not extend to links in your post.

Laney said...

After following your directions, I am still getting the error message. Can you please help me figure out what I am doing wrong?


Vin said...


Can you paste the exact error message here?

tomat said...

Hi, Vin. I've tried to make local links in a post with this trick and they work fine, but I've found a problem if I change to the non-html editor of blogger. In that case, the local links with #NAME are translated to different ones adding internal references of blogger and if I save the post and try to use the links, they go to the edit window of blogger.
¿Am I doing something wrong?
¿Is there any solution to use local links and the non-html editor?


Vin said...


You can make link code ONLY in Edit Html tab of Post Editor. Also see :

Anchor Link to Skip to Top of Page.

tomat said...

Thanks. Vin. That's what I suppose.
In case someone has the same problem than me, the way I have used to recover the original post is as follows:
- If you don't want to keep another changes, just leave the editor without saving.
- But if you have made another changes that you want to keep, just select the whole post and paste in the notebook, and there use replace of text with the complete text of the link fron the http to just before the #, and replace all the modified links and then select all the resulting text in notebook and paste back in blogger in the html editor and save it.

Jen said...

Hi! I am having the same trouble as a previous person with getting an error message when I try to add target='_blank' to the html. I tried your suggestion of checking for < /a > but that seems to be ok. Any other suggestions?

Vin said...


What is the exact error message? Where exactly are you adding it - in the Template Code box or in a Html page element?

Jen said...

I am trying to add it in the layout-->edit html screen.

Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly.
XML error message: Element type "a" must be followed by either attribute specifications, ">" or "/>".

Vin said...


Do not add links directly in the Template Code box. Instead add them in a Link List Page element via Layouts---->Page Elements tab.

Lethe said...

I'm trying to make anchor links between posts and I don't know where in the html to put the code? Does it go in the post html or the template html? I've made a link between posts but they are not anchor. See

Thanks you.

Vin said...


The code has to be pasted in Edit Html tab of Post Editor.

First open your target post for editing and put in the

<a name="WORD">Target Word</>

code where you want the visitor to end up. Publish Post.

Then open the post for editing where you want the link to start and put in the link code :

<a href="LINK_OF_TARGET_POST#WORD">Click to Go to Target Page</a>

Publish Post.

Sister Kim said...

Super helpful. Only place on the net I have been able to find my answer. Since I learned it was a copywright infringement to post whole articles, I've got to start linking! Now it will happen in a seperate window. Thanks and God Bless You!

V said...

hi dude !!

1st of all , thx 4 this awesome blog.

I wanna create a link which when clicked opens a new page. But I want 2 pages to open with that single click .

That is with that single click ,1page of some other website will open and another page of my own blog will open.
How can I do that ?

Vin said...


Can you give the link of a page which has such a link in it?

In short where have you seen such a link?

tackad said...

Really do appreciate your blog. Thanks to your concise posts, I was able to get my blog looking and working the way I wanted.
Was trying to get the links in my link list to open in a new window last night and got the error message. I really don't understand your response to AZAMATTEROPRINCIPLE's comment.
The original code works and we do nothing but properly insert what you've given us into the code.
Why do I get the error message ?

Vin said...


Put in a space in your code :


Change it to :

'' target='_blank'

Bill Donovan said...

Thanks aggain for the good blogger help.

Jinx Garza said...

Woohoo! It worked! You are awesome and I love you. Thank you.

Frederico Ribeiro said...

Hey there...

Excellent post. Just one question: What if I want the links to open on my own blog. For Instance: My blog's, what do I have to do in order to make a sub link or whatever it's called and open it in my own blog:

Thanks in advance

Vin said...

Frederico Ribeiro,

Just omit 'target=_blank' from the link code.

ruthleen said...

hi VIN, am trying to add links,in a way that,with one click example blogs,one can be able to check on subcategories,wanted to put,blogs,blog tips,blog promotion, and if to redirect my viewers to your site how do i do it,
thanx alot

Vin said...


Have a look at How to Construct Links?

Shrawan said...

Thanks a bunch Vin, your post and your answers to many queries implicitly answered my query too.

Melanie said...

Awesome- thanks so much. This was really helpful.


Andy Richards said...

Hi Vin: Thanks for all the information you share here. I have a problem with anchor links on the same page with my Google Blogger site. I am trying to use a Text widget to create "jump to" links to other Text Widgets. When I insert the HTML code, it works at first, but eventually starts to return to the "edit" area (or the Google Blogger login screen). Also, every time I save the HTML code in the Text Widget, Google inserts additional code. Any Suggestions?

Vin said...

Andy Richards,

What is the exact code you are using? Email me.

Deme said...

heloo !!
what if i want to open all links or external links in a popup window on blogger ?
thanks for your time ...


Skip to top of post.

Search Blog Before Commenting


Post a Comment

Please use the above search box to search this blog before posting your valuable comments.

Comments posted on Dummies Guide to Google Blogger (Beta) are moderated and will be approved only if they are on-topic and not abusive. Try not to include website URLs/links in your comments. You can email me : drbhatns at gmail dot com for any blogging question. Thanks,


The Blog Doctor The Blog Doctor2 Blog Doctor Home


Tips On Blogger and Latest News.

Skip to top of post.