Distinguish between HREF and Name attributes of <A> tag with the help of an example??
Answers
The <A HREF> & <A NAME> Tags
<A HREF="http://a..........b.com:80/index.shtml#SSEARCH">search</A>
The <A HREF> is the tag that glues the Web together! This is how you provide links to what are called URLs (Uniform Resource Locator). These typically are pages and images.
In the example above, the worst case scenario is given:
http://a..........b.com indicates the server name.
:80 means TCP/IP port 80 (the default for HTTP)
index.shtml is the page being requested.
#SSEARCH means go to the <A NAME="SSEARCH"> anchor tag on index.shtml
Normally, links to pages on another server are called in the form:
<A HREF="http://bignosebird.com/index.shtml">click</A>
When referencing a page on your server:
<A HREF="/index.shtml">click</A>
The leading slash (/) indicates the absolute path relative to your document root directory. You can also use relative paths:
<A HREF="testdir/index.shtml">click</A>
To allow people to link to arbitrary points of your pages, do the following.
Create the tags <A NAME="TAGNAME"></A> in the desired point of your page.
Then create links to it such as:
<A HREF="/pagename.html#TAGNAME">click here</A>
Note: ALL <A HREF> tags MUST be closed with a </A> tag.