HTML Anchor
The HTML anchor tag defines a hyperlink that links one page to another page. It can create hyperlink to other web page as well as files, location, or any URL. The "href" attribute is the most important attribute of the HTML a tag. and which links to destination page or URL.
href attribute of HTML anchor tag
The href attribute is used to define the address of the file to be linked. In other words, it points out the destination page.
The syntax of HTML anchor tag is given below.
<a href = "..........."> Link Text </a>
Let's see an example of HTML anchor tag.
Example:
<html>
<head>
<title>Body
and its attribute</title>
</head>
<body
bgcolor="pink">
<ul>
<li><a href="dca.html"
align="center" target="_blank">DCA
Course</a></li>
<li><a
href="pgdca.html" align="center"
target="_blank">PGDCA Course</a></li>
</ul>
<a
href="http://www.google.com">Visit Google</a></br>
<a href="#"> About
Me</a><br>
<center>
<a
href="http://www.google.com"><img src="1.jpg"
height="500" width="500"></a>
</center>
</body>
</html>
Hyper Link on Same Page:
<html>
<head>
<title>Body
and its attribute</title>
</head>
<body
bgcolor="pink">
<center>
<h2>Use of the hyperlink</h2>
<a
href="#raj"><h1>About Me</h1></a>
</center>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<a name="raj">
Hello this is Rajneesh
Shrivastava from indore i did M.PhilCS and i am a Teacher mentor and Motivator Coach.Hello this is
Rajneesh Shrivastava from indore i did M.PhilCS and i am a Teacher mentor and Motivator Coach
</a>
</body>
</html>
No comments:
Post a Comment