LINKING DOCUMENTS IN HTML
The link are created in a web page by using the <A>...................</A> tags . Anything written between the <A>....</A> tags becomes a hyperlink/hotspot . By clicking on the hyperlink navigation to a different web pages or image takes place.
A Hyperlink (or link) is a word , group of word,, or image that we can click on to jump to another document. Html allows linking to other html document as well as images . Clicking on a selection of text or an images in one web page will open an entire web pages or an image. The text or an image that provides linkages is called Hypertext, a Hyperlink , or a Hotspot.
The color distinguishes hyperlinks from normal text . Every hyperlink,
- Appear blue in color
- The default color setting in a browser for hyperlink text or images .
- The color can be set dynamically via an Html program if required.
- The hyperlink text / image is underlined.
- When the mouse cursor is placed over it , the standard arrow shaped mouse changes to the shape of a hand.
The blue color , that appear by default , can be over - ridden .To change these link colours, there are three attributes that can be specified with the <body> tag. These are as :
Attribute
|
Description
|
Css\ style
a:link
|
Changes the default color of a hyperlink to whatever
color is specified with this tag. The user can specify the color name or an
equivalent hexadecimal number.
|
Css \style a:active
|
Changes the default color of a hyperlink to whatever
color is specified with this tag. The user can specify the color name or an
equivalent hexadecimal number.
|
Css\style a:visited
|
Changes the default color of a hyperlink to whatever
color is specified with this tag. The user can specify the color name or an
equivalent hexadecimal number.
|
The link are created in a web page by using the <A>...................</A> tags . Anything written between the <A>....</A> tags becomes a hyperlink/hotspot . By clicking on the hyperlink navigation to a different web pages or image takes place.
The document to be navigated needs to be specified . By using the HREF attribute of the <A> tag the next navigable web pages or image can be specified .
Syntax :
<A href = "filename .jpg">
Example:
<html>
<head>
<title>
</title>
</head>
<body>
<CENTER><H1><img src="q.gif">THE BUSINESS INTERVIEW</H1></img><img src="c.gif"></CENTER><IMG SRC="1.GIF"><TEXT-ALIGN RIGHT>yuvaneeds<BR><H6>ON THE NET</H6></BR></IMG><br><HR></HR>
<H4>"WE SHOULD NOT ALLOW THE MERE PROVISION OF<BR>
FOREIGN MONEY TO DESTABILISE INDIAN INDUSTRY"<H4></BR>
<H1>Y</H1>EZDI H MALEGAM ,<H6>MANAGING PARTNER ,<U>PRAVEEN VERMA</U>AND COMPANY,IS A WARM ,GENIAL PERSON,TOGETHER,WITH BEING ON ASTUTE AND NOTED LAWYER .AUTHOR OF THE REPORT ON DISCLOSURE I OFFER DOCUMENT ,HIS RECOMMENDATION HAVE REVOLUNTIONISED THE INDIAN STOCK MARKET........<BR><H4>WHAT ABOUT THE MERGERS AND ACQUISITIONS SCENARIA IN INDIA?</BR><BR>IN INDIA we are going to see a lot more of ACQUISITIONSthen maergers of india unit ,as a fair amount of foreign<br>
investment is coming in the country .I see that in the next two years ,the rate ofACQUISITIONSby both the multinational <br>and indian companies will accelerate .Given a choice between a greenfield project and an existing unit ,an mnc will<br>prefer to acquire an existing unit.<hr>
<a href=business1.html>home</a>
</body>
</html>
Hyperlink are two types :
- Links to an external document
- Links (jumps) to a specific place within the same document.
External document reference = Link to any page in the world , you needs to (url) of the page,
we want to link to:
Example: ( <A href = "
image.html!">home</A>)
By
default , hyperlink takes a user to the begninning of the new web page. At
times , it might be necessary to jump to a particular location within the new
web pages .To enable a jump to a specific location on a web page, named anchors
can be set up. Anchors target hyperlinks to a specific location point on a web
page .
Jumping to a particular location on a web
page can be summarized in two steps:
- STEP ONE:
Mark the location to be
jumped to i.e identify the location in a web page to jump to by giving the
location a name .
Using the name attribute of the <A> tag
does this.
syntax:
<A name = "location _ name">
Example :
< A name ="YFC">
- STEP TWO = While jumping to a specific web page and a specific
location on the web page , in addtion to the name of the web page to be
jumped to, the name of the location on the web page to go to is required.Hence
the webpage to jump to , require a yfc.htm , together with the name of the
location to jump to in the html file .
syntax:
< A href ="YFC.Html # name
">................ </A>
Example :
< A href ="YFC.Html # name ">
home </A>
Internal document
references = Sometimes , a
jump is required to a different location in the same document , Since the jump
has to be targeted to a specific location , the same two steps need to be
performed as before , i.e identify a location with a name and then jump to that
location using the name . The difference is that the YFC.htm now will be the
current YFC.htm.
Syntax:
< A name "location _ name ,">
< A href "# location _ name
">.....................</A>
Example :
< A name = "location">
< A href ="location"> Home
</A>
Images as Hyperlinks
It is similar just as a text act as a hyperlink , so also images can act as hyperlinks. Anything included within <A>............ </A> tags becomes a hyperlink , Thus , an image can be made a hyperlink by enclosing as <img> tag within the <A>............. </A> tags. The <IMG> tag places the image on the screen , and because the <img> tag is enclosed within the <A>...................</A> tags, it becomes a hyperlink or hotspot.Example:
<A href = "yfc.html"><IMG src= rose. gif"/></A>Image maps
When a hyperlink is created on an image , clicking on any part of the image will lead to opening of the document specified in the <A href .....> tag. If the image is a large image and there is a need to link multiple documents to the same images , there has to be a technique that divides the image into multiple sections and allows linking of each section to a different document. The technique i.e implemented to achieve this is an image map. Image maps can be created and applied to an image so specific portions of the image can be linked to a different file / image. Lunked region of an image map are called hot regions and each hot region is associated with a yfc.htm document that will be loaded into the browser , when the hot region is clicked .
Creating an image map is a two step process:
- Creating an image map , i.e , divide the image into various areas . This is done using the <MAP></MAP> tags. The <MAP> tag takes an attribute , name , via that the map can be referenced in an html file.
Syntax:
<MAP name = "map name">
Example:
<MAP name = "yfc_map">
<Area shape = "rect" coords = "54,76,123,80" Href ="yfc.htm">
<Area shape = "rect" coords = "54,89,321,54" Href ="pk.htm">
2. Dealing with applying the image map to a particulr image . For this purpose , the <img> tag takes an attribute caleed use map that takes the name of the image map as a value , and applies the map specification to the respective image . The value is always proceded with the # sign.
Syntax:
<IMG usemap = "#map_name">
Example :
<IMG src = "yfc.gif " use map ="# pk_map">
0 comments:
Post a Comment