How to Insert a URL With Links Into Div

An HTML div container lets you organize and lay out your website into different sections. You use the div container to display links to your internal pages or external websites of interest. You must place the links within the opening and closing div tags in your HTML code. The div tag expands as you add more links, so you can add as many links as you want to the container.

Instructions

    • 1

      Right-click the HTML file you want to use to display the links. Click "Open With." Click your preferred HTML editor in the list of programs.

    • 2

      Locate the div container you want to use to insert the hyperlinks. If you do not have a div created already, use the following code to create a div on your page:

      <div id="links"> </div>

    • 3

      Insert the hyperlinks into the div tag. The link code must be placed within the two tags created in Step 2. For instance, the following code shows you how to add two hyperlinks:

      <a href="mydomain.com/page1.html">Click for page 1</a> <br />
      <a href="mydomain.com/page2.html"> Click for page 2</a>

      The "Click for..." text is what is displayed to the reader. Replace the "href" property links with your own website pages or a link to an external site.

Related Searches:

References

Comments

Related Ads

Featured