Link to a location of a document

To link to a location in a document, you need to use name attribute. The name attribute will create a bookmark where you want to link to.

Example:

<html>            

<head>

<title>Anchor link</title>

</head>

<body>

            <strong>HTML Link:</strong>

            <p>

            It is very rare that web pages you see on the web don’t have links. HTML links provide you

the ability to jump to related information. Links are defined in HTML using the &lt;a&gt; tag. You can

use HTML link to jump to a document or to any location in that document.

            To link to a document, you need to use href attribute. The value of this attribute is the file

that you want to jump to. You also need to provide the link text so that the user will see that text and

then click on it. The link text is in &lt;a&gt; and &lt;/a&gt; tags. There are a few things you need to

note:<a href="#note">Visit the note section</a>.

            </p>

            <p>

            <img  src="logo.gif" alt="My logo" width="50%" height="60%" align="top">

 

            </p>

            <p>

            <a name="note"></a>

            <h4>Note:</h4>

            <ul>

            <li>The alt attribute is used to replace the image show in the occasions that a text-based

browser can’t view images.

            <li>To control the width, height, and position of the image, we use width, height, and align

attributes respectively.

            </ul>

 

            </p>

</body>

</html>






This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages:
C, C++, C#, Java, VB.NET, Python, VBA,PHP & Mysql, SQL, JSP, ASP.NET,HTML, CSS, JQuery, JavaScript and other applications such as MS Excel, MS Access, and MS Word. However, we don't guarantee all things of the web are accurate. If you find any error, please report it then we will take actions to correct it as soon as possible.