Edit

How to Create a Link

Edited byRafi Rafat (see all) and 1 other

Article
Edit
Discuss History
Create a Link

Hyperlinks, usually referred to simply as "links," are a crucial part of the Internet as a whole and each website in particular. Links allow users to click on a piece of text or an image and be propelled towards another web page. They are therefore integral to the experience of web browsing. Creating hyperlinks as part of your website requires only a short snippet of HTML code. You can create a link quickly by using this code.

Edit Steps

  1. 1
    Create the text or image you want to use as a link. Links are created using a simple HTML tag, but first you should create the content that will be placed inside the tag. This can be text, an image, or another HTML element.





  2. 2
    Surround the content you created with the tags. Hyperlinks are indicated using a simple tag, closed with the corresponding tag. These tags won't be functional if used without any attributes, but you can add those soon.





    • For example, your link might currently look like this: Click here to visit my new page.
  3. 3
    Add the "href" attribute to indicate the hyperlink's destination. The "href" attribute tells the browser where to direct the user once the link is clicked. It is followed by an equals sign, which is followed by the destination web address in quotations.





    • Continuing with the example above, your link might now look like this: Click here to visit my new page.
    • Note that if the link's destination is an external website, you must include the entire URL (which likely begins with "[http"). http").] If only the page name is specified, as above, the current page's directory will be used as the parent directory.
  4. 4
    Create an email link using the "mailto:" modifier. To create a link which will begin composing an email message to a particular address, use the "mailto:" modifier just before the person's email address.





    • For example, an email link might look like this: Click here to ask a question or voice a concern.
  5. 5
    Create anchors within a large web page to be referenced later. If you need to link to a specific portion of a web page, you need to use an anchor. Anchors are useful in large pages with a table of contents; each section of the text can be assigned an anchor to which the table of contents can link. Anchors are created using the "name" attribute.





    • To create an anchor, insert the following tag at the appropriate location on the page: Chapter 3 - Using Anchors in HTML
    • To link to the anchor you created, use the # sign as follows: Skip to Chapter 3

Edit Video



Edit Tips

  • To use an image as a link's content, simply nest the <img> tags inside the <a> tags.
  • If you specify an incorrect anchor name, the browser will simply redirect to the top of the page.

Edit Things You'll Need

  • Computer
  • Text editor or web design software

Edit Sources and Citations

Articles for You to Write

Here is a list of suggested articles that have not yet been written. You can help by researching and writing one of these articles. To get started writing one of these articles, click on the red link of a title below.

Article Info

Last edited:
November 3, 2011 by AgitatedMuffin

Categories:
Internet

Recent edits by: Rafi Rafat (see all)

Article Tools

Share this Article:

Thanks to all authors for creating a page that has been read 502 times.

Was this article accurate?

YesNo


x

Thank Our Volunteer Authors.

Give this article a +1.