1 / 13

HTML links

HTML links. A hyperlink (or link) is a word, group of words, or image that you can click on to jump to a new section within the current document, or a new document, or to another website. When you move the cursor over a link, the arrow will turn into a little hand.

ping
Download Presentation

HTML 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. HTML links • A hyperlink (or link) is a word, group of words, or image that you can click on to jump to a new section within the current document, or a new document, or to another website. • When you move the cursor over a link, the arrow will turn into a little hand. • The link is displayed as blue underlined text. • These other locations are called targets.

  2. HTML links • A link is specified usinganchor tags: <a></a> • Anything between the opening < a > tag and the closing < /a > tag becomes part of the link that users can click in a browser

  3. HTML links • To link to another web page, the opening < a > tag must carry an attribute called href ; the value of the href attribute is the name of the file you are linking to • href means “hypertext reference” • This attribute tells the browser where to find a link

  4. HTML links within the same folder • A link to a web page within the same folderof the website would look like this: <a href="filename.html">text to be clicked</a>

  5. <a href="filename.html">text to be clicked</a> • The href attribute contains the file name of the destination web page • The file name is enclosed in quotation marks and it includes the .html extension • The text between the opening and closing a tag is the link you will click • To keep things simple, for now place all your web pages in the same folder

  6. Linking to another website • Linking to another website is done by putting the entire website address (url) into the href attribute: <a href="http://www.siteaddress.com">text to be clicked here</a> • Be sure that http:// is included in the website address

  7. Link syntax: <a href="filename.html">text to be clicked</a> <a href=”http://www.google.com”>This is a link </a> - Attributes: target and name

  8. What would your syntax be to get following result?

  9. In Notepad it should look like this

  10. OR

  11. What would your syntax be to get following result?

  12. Example of Links

  13. Example of Bookmark • <p><a href = "#top">Back to the top</a>

More Related