iWeb FAQ - Anchors
iWeb FAQ - Anchors
iWebFAQ.org
What is an Anchor? How can I add Anchors to iWeb?
This tutorial about adding anchors to iWeb uses the same technology (application) the Alternative HTML FAQ does.
Warning: it might seem to be a hassle and/or complicated to some of you but trust me, it isn’t, it’s very easy! Really! Try it!
What is an Anchor?
An anchor is a link which points to a part of the same page the link is added to.
Let’s make an example:
Say you have a page which is full of text and divided in chapters. You want to have an index of the chapters at the top of the page and when someone clicks on a link in that chapter index you want him to be taken directly to the chapter he wanted to read. How can you afford that? That’s what anchors are good for... Try it by clicking on this link which will take you straight to Note 1
How can I add Anchors to iWeb?
That’s how you do it:
1. Write the content of the page you want to have Anchors in
2. Now we will make the index of the page. With index I mean the list of all the sections/chapters on the page. This index will be made of links. So if someone clicks on them he will be taken to the part of the page which is of interest. That’s how to do it:
Write the title of the section
Open the Inspector and go to the link tab
Choose Enable as hyperlink and “Link To: An External Page”
http://yourdomain.com/sitename/pagename.html#1 for section 1
http://yourdomain.com/sitename/pagename.html#2 for section 2
http://yourdomain.com/sitename/pagename.html#3 for section 3
and so on...
Replacing yourdomain.com with your domain or web.me.com/username
Sitename with the name of the site in iWeb
Pagnename with the name of the page
3. Where the chapter starts, thus where you want people to be pointed to from the index near the title of the section or chapter write add a Textbox and write
PagenameChapter1 for section 1
PagenameChapter2 for section 2
PagenameChapter3 for section 3
and so on...
Replacing Pagename with the name of the page
Put these codes Text Indent 2 px (Open the Inspector, go to the Text tab and choose List change the text indent to 2 px)
4. Now go here and Download MassReplaceIt (it’s free)
5. Open MassReplaceIt
6. In Find you enter the code PagenameChapter1 of point 3
7. In the Replace
<a name="label"></a>
Change the parameter “label” with the number of the section
So it will read:
<a name="1"></a> for section 1
<a name="2"></a> for section 2
<a name="3"></a> for section 3
8. You can set more than one Find&Replace at once if you want to add more than one Anchor, for each Anchor you have to set a different Find&Replace.
9. Save the Query naming it something like Anchors so you know what it is and for future changes you just edit this query and re-save it.
10. In Files add the folder you publish to from iWeb or the iDisk folder (iDisk/Web/Sites folder)
11. Click “Replace” and it will search your pages for the codes you added in the Find fields. click on “Replace All” and the HTML code will be added
12. Re-run MassReplaceIt every time you (re-)publish
Of course you can also name the anchors using whatever you like. I used 1 2 3 in the example to make it easier. Just don’t use special characters like à è ä ! ? and replace spaces using _ instead.
Note 1 : Linking to a specific part of the page from another page
To link to a specific part of the page from another page use an external hyperlink like this:
http://urlofthepage#nameoftheanchor
Example: http://iwebfaq.org/site/iWeb_Anchors.html#note1
Note 2: Important note about MassReplaceIt settings:
- In Options select Search=Contents, Location=Entire file/Filename, Options=Search whole words
- In Preferences When adding a folder to a search list=Add a folder, Search: folder’s name and contents
To fix it in a page copy and paste the TextBox in the main TextBox of your page. Now if you add text the TextBox will move automatically with the page.
If MassReplaceIt didn’t work. If MassReplaceIt didn’t find any of the TextBoxes to replace with HTML codes. Read this MassReplaceIt & HTML troubleshoot page.
iWebFAQ.org - Tutorials, Tips & Tricks is made with iWeb and for iWeb.
It’s presented by Cédric and hosted by HostExcellence.com
I would like you to give me feedback on this page by commenting here. Tell me if it's been helpful. If it wasn’t please tell me why. If you think something is missing please tell me what.
Thank you for visiting and supporting my website.
- Cédric -

