1 / 10

Hyperlink

Hyperlink. Anchor tag and its attributes Four Types of URL Email Absolute addressing Relative addressing Intrapage Attributes -- link, vlink, alink Anchor tag with image. Anchor Tag and its Attribute.

brac
Download Presentation

Hyperlink

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Hyperlink • Anchor tag and its attributes • Four Types of URL • Email • Absolute addressing • Relative addressing • Intrapage • Attributes -- link, vlink, alink • Anchor tag with image

  2. Anchor Tag and its Attribute • Hyperlink or Anchor is represented by text or image that is linked to another Web page, either on the same site or in another Web site. Clicking on the link will take the user to another Web page, or to another place on the same page. • To create a link, use anchor tag and href attribute <a href=“addressOftheWebpage”> text/image </a>

  3. Email Link • Text is used as email link <a href=“mailto:priya@comet.lehman.cuny.edu”> Click here to my email </a> • Image is used as email link <a href=“mailto:priya@comet.lehman.cuny.edu”> <img src=“EmailPic.gif” alt=“Email”> </a>

  4. Absolute addressing Link • Absolute addressing is entire path of where a file exists; Full description of the address • Absolute address of a Web page on the internet http://comet.lehman.cuny.edu/priya • Absolute address of a Web page on a local system A:/Webfolder/index.html

  5. Relative addressing Link • Relative addressing is a special addressing method that applies only when the address you'd like to link to is on the same server or system as the web page that the link appears. • Relative addressing requires only a partial pathname. • This partial pathname only needs to contain enough information to set it from the current directory to the file you’d like to link to.

  6. Relative addressing Link • The simplest example would be the case where the webpage you’d like to link to are in the same system and directory. <a href=“RelativeLink.html”>my link</a> • Partial pathname is expressed in notations • \ go to the main directory • ..\ go one directory up in hierarchy • .\ the current directory

  7. Intrapage Link • Intrapage link directs or goes to a particular spot on a given Web page • Two parts to Intrapage link • Naming a region • Linking to the region

  8. Intrapage Link Naming a Region • For an intrapage to work, we need to name the position within the page that we’d like to go. • To name a region within a Web page, we use the anchor tag with a name attribute. <a name=“AssignNameValue”> my region </a>

  9. Intrapage Link Linking to the region • To link to an identified region, use the anchor tag and href attribute. • The value for the href attribute must begin with a hash or pound symbol, followed by the name of the region <a href=“#UseAssignedNameValue”> Go to a particular region </a>

  10. Attributes -- link, vlink, alink • link, vlink, alink are attributes of body tag. Each effects the color of links at different stages. • link attribute effects the color of an unvisited link • vlink attribute effects the color of a visited link • alink attribute effects the color an activated link <body link=“blue” alink=“red” vlink=“purple”>

More Related