1 / 6

Creating Links

Creating Links. The Anchor Element:. The anchor tag <a> can be used in three different ways: External link – to link to a web page outside your own website. Internal link – to link to another web page on your own website. Bookmark – to link to another position within the same web page.

templeton
Download Presentation

Creating Links

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. Creating Links

  2. The Anchor Element: The anchor tag <a> can be used in three different ways: External link – to link to a web page outside your own website. Internal link – to link to another web page on your own website. Bookmark – to link to another position within the same web page.

  3. Anchor Attribute Syntax: <a href="http://www.yahoo.com" target="_blank">Go to Yahoo!</a> Remember, attribute names must be in lowercase and attribute values must be enclosed in quotes. Whatever content is placed between the <a> and </a> tags will display on the web page and become a clickable link. Go to Yahoo!

  4. External Links: <a href="http://www.yahoo.com" target="_blank">Go to Yahoo!</a> href= “hyper text reference” – for external links, use the entire URL address to the web page you wish to link to. Be sure to include the "http://" (It might be easier to copy and paste from a browser window.) target= this refers to where the web page will display. The value “_blank” tells the browser to open a new window or tab.

  5. Internal Links: <a href="page2.html">Next page</a> href= for an internal link, enter the name of the other web document file. Unless you specify a location of the file on your server, the browser will assume the file is in the same folder as the current page. If you do not specify a target attribute, the page will open in the same browser window by default.

  6. Bookmark Links: <a href="#bottom">Click here to go to the end</a> . . . <a name="bottom">This is the end</a> Bookmarks are combination of two anchor elements. The first is where you start, the second is where you end up. For the first <a> tag, use the href element and enter # and the name of the anchor you wish to link to. For the second <a> tag, use the name attribute and enter the matching name (without the #). Bookmarks are often used to build tables of contents within web documents.

More Related