Faye14
Uploaded by
7 SLIDES
0 VIEWS
0LIKES

HTML Links

DESCRIPTION

It is all about connecting one page to another.

1 / 7

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

  2. HTML Links - Hyperlinks • HTML links are hyperlinks. • You can click on a link and jump to another document. • When you move the mouse over a link, the mouse arrow will turn into a little hand. • Note: A link does not have to be text. A link can be an image or any other HTML element!

  3. HTML Links - Syntax • The HTML <a> tag defines a hyperlink. It has the following syntax: <a href="url">link text</a> • The most important attribute of the <a> element is the href attribute, which indicates the link's destination. • The href (hypertext reference) is an attribute of the anchor tag, which is also used to identify sections within a document. • The link text is the part that will be visible to the reader. • Clicking on the link text, will send the reader to the specified URL address.

  4. Example • This example shows how to create a link to Facebook.com: <a href="https://www.facebook.com/">Visit Facebook.com!</a> By default, links will appear as follows in all browsers: • An unvisited link is underlined and blue • A visited link is underlined and purple • An active link is underlined and red

  5. Absolute URLs vs. Relative URLs • Both examples below are using an absolute URL (a full web address) in the href attribute. • A local link (a link to a page within the same website) is specified with a relative URL (without the "https://www" part): • Example <h2>Absolute URLs</h2><p><a href="https://www.w3.org/">W3C</a></p><p><a href="https://www.google.com/">Google</a></p><h2>Relative URLs</h2><p><a href="html_images.asp">HTML Images</a></p><p><a href="/css/default.asp">CSS Tutorial</a></p>

  6. HTML Links - Use an Image as a Link • To use an image as a link, just put the <img> tag inside the <a> tag: <a href="default.asp"><imgsrc="smiley.gif"></a>

  7. Link to an Email Address • Use mailto: inside the href attribute to create a link that opens the user's email program (to let them send a new email): <a href="mailto:someone@example.com">Send email</a>

More Related