Guidance portal

World of Guidance and Education

Text Links (Anchors)

Commonly know as "hyperlinks" text links are important to link every page of your website with one another in a meaningful formation. Some text links link with web pages, others link with files. Lets start learning the procedure to insert text links:

As usual the syntax of text links along with explanation is shown below. Carefully read the syntax.

     <a href="this is the page or file for link">
    this is the visible text link
    </a>

"this is the page or file for link": Here provide the complete path of the web page or location of file you want to link with.

"this is the visible text link" (shown in red): Here provide the link name you want to be displayed on the webpage.

For example the code shown below links one page to other web pages:

     <a href="http://your site/page" target="_blank">
    Hello Sir
    </a>

Here target = self means when you click on link, the link will open in the same tab and if you want the link to open in browser's new tab then write "_blank" instead of "_self".

The page will display Hello Sir as link display and opens the page of which you have provided the path.



Note

Thera are several targets

  • _blank
  • _self
  • _new
  • _parent
  • _top

Blank target is normally used when a download link is placed.

Now we place a simple linked text and see how its looks like on browser. Lets start

    <!DOCTYPE HTML>
    <html>
    <head>

    <title>OUR FIRST WEB PAGE</title>
    </head>

    <body>
    <p>
    <a href="your file.html" target="_blank">your page or file</a>
    </p>
    </body>
    </html>

    browser view

    Note

    For download link must insert the formate of file,l, like pdf or zip etc.

Download links:

Download link is placed in the webpage when there is the file for download,like pdf ,or  any other  type of file. There is litle different in path of download link .In download link you must insert the file formate in the end like .pdf, .zip etc. Lets start learning the procedure to insert download links:

As usual the syntax of download links along with explanation is shown below. Carefully read the syntax.

    <!DOCTYPE HTML>
    <html>
    <head>

    <title>OUR FIRST WEB PAGE</title>
    </head>

    <body>
    <p><a href="http://www.your web site.com/your folder/.html/your folder of download.zip">your file for download</a></p>
    </body>
    </html>

    browser view

     

Above mentioned is a very simplistic approach for learning HTML step by step.  Continue learning here

 

comments powered by Disqus