Hey If any one have idea for
How to create links to sections on the same page in HTML.
|
Go4Expert Founder
|
![]() |
| 1May2012,08:49 | #2 |
|
<A href should help you make links in html page.
|
|
Go4Expert Member
|
|
| 30May2012,11:44 | #3 |
|
If you are asking about Named Anchors this is a way to do it...
This would be the code to define the Section PHP Code:
This would be the code to link to the Top Section PHP Code:
I hope you understood how it works.. |
|
Contributor
|
|
| 30May2012,22:32 | #4 |
|
Quote:
Originally Posted by bzforum PHP Code:
PHP Code:
|
|
Banned
|
|
| 5Jun2012,15:13 | #5 |
|
you cane use <a href="URL">your name </a>, you can also try
|
|
Ambitious contributor
|
|
| 11Jun2012,03:08 | #6 |
|
Give the element and id and point to it via the href attribute for the link like so
HTML Code:
<a href="#mySection">MySection</a> HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <style type="text/css"> div#l { width:100%; height:600px; background: #CCC; } div#m { width:100%; height:600px; background: #999; } div#n { width:100%; height:600px; background: #666; } </style> </head> <body> <div id="links"> <a href="#l">L section</a> <a href="#m">M section</a> <a href="#n">N section</a> </div> <div id="l">SomeText</div> <div id="m">SomeText</div> <div id="n">SomeText</div> </body> </html> |


