Links & Anchors

Forms Tables Images Mark-ups Lists
Midterm Final








You're only as strong as your weakest Link

A link is the most distinguished feature of the World Wide Web. A link has three main features

Table of Contents
Link Exampes
Creating a Link to another Web Page
Creating Anchors
Link to a specific Anchor
Targeting Links to specific windows
Setting a default target






















Examples of Links



(<)a href="" (>) Link Example (<)/a(>)






Creating a Link to a another Web Page



  1. Type ( < ) a href="page.html" (>) where page.html is the URL of the destination Web page
  2. Type the label text,that is, the text that is highlighted (usually blue snd underlined.) and when clicked upon willtske the user to the page referenced in step 1.
  3. Type(<)/a(<>) to complete the definition of the link.







Creating Anchors



  1. Place the cursor in the part of the Web page that you wish to jump to
  2. Type (<(<)a name="anchor name"(<), where anchor name is the text you will use internally to idetify that section of the Web page.
  3. Add the words or images thst you wish to be referenced.
  4. Type (<)/a() to complete the definition of the anchor.







Link to a specific Anchor



  1. Type (<)a href="#anchor name"(>), where anchore nameis the value of the name attribute in the destination's a tag (Step 2) or the value of the destinations id attribute.
  2. Typw the label text, that is, the text that is highlighted(usually blue and underlined),and that when clicked upon will take the user to the section referenced in step 1.
  3. Type (<)/a(>) to complete the definition of the link.







Targeting Links to specific Windows










Set default target



  1. In the head seaction of your Web page, type (<)base.
  2. Type target="title",where title is the name of the window or frame in which all the links on the page should be opened, by default.
  3. Type /(<) to complete the base tag.