WEB DESIGN GARAGE [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

WEB DESIGN GARAGE [Electronic resources] - نسخه متنی

Marc Campbell

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید






Linking to Named Anchors


To link to a named anchor, you need another anchor tag, only this one should be a source anchor, not a destination anchor. In the href attribute of the source anchor, type a number sign (#) followed by the name of the anchor to which you want to link, like this:


<ol>
<li><a href="#question01">What is the meaning of life?</a></li>
<li><a href="#question02">What is the meaning of money?</a></li>
<li><a href="#question03">What is the meaning of time?</a></li>
</ol>

These anchor tags appear as regular hyperlinks in the browser. That's because they are regular hyperlinks. The only difference is that they go to named anchors on the same page, not to the top of some other page.

FAQ

If a named anchor is invisible, how does the browser show that the visitor has jumped to one?

Normally, when the browser jumps to a named anchor, it scrolls the screen so that the anchor point is at the top.

What happens if you want to link to a named anchor that exists on some other page? Not a problem. Simply tack the named-anchor nomenclature to the end of the path, like this:


<a href="#newrelases">New Releases</a>

This hybrid path finds the page movies and then jumps to the newreleases named anchor on this page.


TIP


It's good etiquette to include a Back To Top link somewhere after the named anchor. This way, the visitor can return to the source of the link quickly and easily.

You can accomplish this with another named anchor. By way of example, assume you're building a FAQ page. Right before the list of questions, insert a named anchor called top. Then, after the answer to each question, add code to this effect:


<a href="#top">Back to the top</a>


/ 175