How to Create a Link

Two Methods:Creating a Basic LinkAdding Modifiers

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 basic link quickly and then add modifiers to that link by using this code.

Method 1
Creating a Basic Link

  1. Image titled Create a Link Step 1
    Create the text or image you want to use as a link. Links are created using a simple HTML tag when editing the code of your website. First, however, you should create the content that will be placed inside the tag. This can be text, an image, or another HTML element, though the example used here is text.
  2. Image titled Create a Link Step 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. Image titled Create a Link Step 3
    Add the "href" attribute to indicate the hyperlink 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"). If only the page name is specified, as above, the directory of the current page will be used as the parent directory.

Method 2
Adding Modifiers

  1. Image titled Create a Link Step 4
    Create an image link. This is done by simply adding an image tag within the link tags. You will need the address of the hosted image, however (such as its location on your server or another server). Here is what an example image link might look like:
    • <a href="the_intended_link_url.html"><img src="../the_picture_in_question.jpg" /></a>
  2. Image titled Create a Link Step 5
    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.
  3. Image titled Create a Link Step 6
    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


  • You don’t need a special software to build websites. Most computers will come with text editing software capable of creating html files. An example would be Microsoft’s Notepad program. You simply type the code and save as html. However, you will not be able to readily see a preview like you can in more advanced programs, and it lacks features to double check your code and make sure everything works and conforms to the appropriate rules.
  • You can change how links looks using CSS styles and other methods.

Things You'll Need

  • Computer
  • Text editor or web design software

Article Info

Categories: Internet