HTML Hypertext Link Procedures

The following table describes HTML hypertext link procedures:




Marks the start of a hypertext link by using the HTML <A> tag. When the user clicks the area with the hypertext link, the web browser switches to the specified HTML document.


html_a(string attributes)

Attributes: Defines the HTML attributes that are incorporated inside the HTML <A> tag. At a minimum, you should define the href attribute, which specifies the URL of an HTML document.

Some common attributes include:

  • href: Indicates where the hypertext link points.

    Example: href=home.html

  • name: Indicates an anchor to which a hypertext link can point.

    Example: name=marker1


The anchor is positioned at the top of the document. The first hypertext link points to the HTML document named otherdoc.html. The second hypertext link points to the anchor named TOP:

do html_a('NAME=TOP')
do html_a_end
print 'At the top of document' ()
do html_br(20, '')
do html_a('HREF=otherdoc.html')
print 'Go to other document' ()
do html_a_end
do html_p('')
do html_a('HREF=#TOP')
print 'Go to top of document' ()
do html_a_end


Marks the end of a hypertext link by using the HTML </A> tag.