| Worth Reading? |
How to Link to a Particular Line or Paragraph on a Web Page Using HTML
|
![]() LINKING TO SPECIFIC HEADING ON A WEB PAGE CAN BE DONE USING ANCHORS LET ME EXPLAIN WITH A CODE Step 1 <body> <h2>paragraph 1</h2> <p> this para will be used to as an introduction to this example in this example we will link to the next heading </p> <h2>this is the linked para<h2> <p> hope this example will help you to mlearn this process all the best </p> </body> above code is a code for a simple page with 2 heading and two paragraphs if you would like to link to each heading you must add an anchor to each of it please see what i am adding to the code <body> <h2>< a name="link1">paragraph 1</a></h2> <p> this para will be used to as an introduction to this example in this example we will link to the next heading </p> <h2><a name="link2">paragraph 2</a><h2> <p> hope this example will help you to learn this process all the best </p> </body> the newly added code in an anchor it is the first step in linking process (newly added code ins marked in red ) note: you can replace link1 and link2 with any name you would prefer Step 2 This is the link code for linking to paragrah 1 from any other website <a href =http://www.yoursiteorblog.com/any-page.html#link1">paragraph 1</a> This code can be used to link from the same page but above code can be used for doing it too <a href="#link1">paragraph 1</a> code for linking to paragraph 2 from any other website <a href =http://www.yoursiteorblog.com/any-page.html#link2">paragraph 2</a> This code can be used to link in same page <a href="#link2">paragraph 2</a> Note:replace link1 and link2 with the anchor name (<a name="anything you used in last step ">) Hope this howto was helpful to you for more helpful articles,videos please click here and install my toolbar |
|
|
|
Questions related to this blog
|
|
Help! Does anyone know the HTML to insert for text click that takes you to lower down on the page? |










