Presentation is loading. Please wait.

Presentation is loading. Please wait.

  This is a different use of the anchor tag; it simply gives a name to the specific point on the page where the tag occurs. The tag must be included,

Similar presentations


Presentation on theme: "  This is a different use of the anchor tag; it simply gives a name to the specific point on the page where the tag occurs. The tag must be included,"— Presentation transcript:

1

2   This is a different use of the anchor tag; it simply gives a name to the specific point on the page where the tag occurs. The tag must be included, but no text between and is necessary.  An anchor is named point on a Web page. The same tag is used to create hypertext links and anchors (which explains why the tag is named ).

3  Return to Index.  The # symbol means that the word top refers to a named anchor point within the current document, rather than to a separate page. When a reader clicks Return to Index, the Web browser displays the part of the page starting with the tag.  Here’s an easy way to remember the difference between these two different types of tags: is what you click, and is where you go when you click there.

4  You can even link to a named anchor on another page by including the address or name of that page followed by # and the anchor name.  You’re bossy, ugly and smelly, but I still love you.  Clicking You’re bossy, ugly and smelly, but I still love you brings up the named sonnets.html and goes directly to the point where occurs on that page. Note that anchor names can be numbers, words, or any combination of letters and numbers.

5  In addition to linking between pages and between parts of a single page, the tag allows you to link your email address. This is the simplest way to enable readers of your Web pages to “talk back” to you.  An HTML link to my email address looks like the following:  Send me an email message.  If you want people to see your actual email address, type it both in the href attribute and as part of the message between the and tags.

6 TagAttributeFunction … With the href attribute, creates a link to another document or anchor; with the name attribute, creates an anchor that can be linked to. href=“…”The address of the document or anchor point to which to link. name=“…”The name for this anchor point in the document. Id=“…”Used exactly like name. (Include both name and id for maximum past and future compatibility.)

7  Write the HTML to make it possible for someone clicking the words “About the authors” at the top of the page to skip down to a list of credits at the bottom of the page.  Suppose your company has three employees and you want to create a company directory page listing some information about each of them. Write the HTML for that page and the HTML to link to one of the employees from another page.

8  If your email address is bon@soir.com, how would you make the text “goodnight greeting” into a link that people can click to compose and send you an email.bon@soir.com


Download ppt "  This is a different use of the anchor tag; it simply gives a name to the specific point on the page where the tag occurs. The tag must be included,"

Similar presentations


Ads by Google