Friday, 22 July 2011

Linking Text and Documents


Hyperlinks

Possess a preferred link to learn could be the hyperlink to another location. The <a> tag with all the href attribute and it is closing tag, </a>, surround any text that is usually to be highlighted. The default web page link highlighting in HTML is definitely underlined blue text. 

Please <a href="http://www.microsoft.com">click here</a>
 
to open the Microsoft Web site.
 

Linking to Other Files

The hyperlink is used to point to another file on the computer

Files in the same directory

The 2nd. html file is stored inside same directory as the actual page linking to it.
 
<a href="second.html">click here</a> 
 
to open my second Web page.

 

Files in another directory

In case second. html file appeared to be stored in another service (for example, the backlinks directory), the hyperlink will have to include the directory appoint too.

<a href="links/second.html">click here</a> 
 
to open my other page.
 
 

Forces hyperlink to open a new browser window

Use the target="_blank" attribute

<a href=”second.html” target="_blank">Click here</a>

 to open a related Web site.

Linking Email Address

An email address can be linked by using the mailto prefix. When the words click here is clicked, an email window is popped up to write the message.
         
<a href="mailto:iac@buet.ac.bd">Click here</a>
                
to send mail to IAC.

 

Linking Within the Same Page

 HTML PAGE provides hyperlinks to point into a specific spot (or anchor) with an HTML document, instead of just pointing to your entire document. The <a> tag features attributes name and id to name an anchor (or bookmark) in the document. The anchor tag is used to point directly to that bookmark.

 

<p>
<a href=”#venue”>Click Here</a> to view the venue.<br/>
<a href="#" name="venue"></a>IAC, West Palashi, BUET
</p>

Linking to an Anchor in another Page

Creating a hyperlink to an anchor in another page requires only one more element: the URL.


<p>
<a href=”other.html#venue”>Click Here</a> to view the venue.<br/>     
</p>

No comments:

Post a Comment