My Profile

Wednesday, February 2, 2011

Anchor Tag


The Anchor element is the essence of HTML.  It is marked text that is the start and/or destination of a hypertext link. HTML uses the <a> (anchor) tag to create a link to another document. An anchor can point to any resource on the Web: an HTML page, an image, a sound file, a movie, etc.

This element accepts several attributes, but either the NAME or HREF attribute is required.


The HREF Attribute

The <a> tag is used to create an anchor to link from, the href attribute is used to address the document to link to, and the words between the open and close of the anchor tag will be displayed as a hyperlink.

Syntax :-
                        <a href="url">Text to be displayed</a>

The NAME Attribute

The name attribute is used to create a named anchor. When using named anchors we can create links that can jump directly into a specific section on a page, instead of letting the user scroll around to find what he/she is looking for.

Syntax :-
                        <a name="label">Text to be displayed</a>

The Target Attribute

Browser windows can now have names associated with them.  Links in any window can refer to another window by name. With the target attribute, you can define where the linked document will be opened.

Syntax :-
                        <A HREF="url.html" TARGET="window_name">Link text</A>



----------------------------------------------------------

** If you like this post please like our page in facebook

1 comments:

Thanks for sharing your info. I really appreciate your efforts and I will be waiting for your further write ups thanks once again.

Post a Comment

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More