I thought that it would be a simple matter to use a named anchor to Hyperlink to a specific row of a table. Apparently it's not as easy as I thought. Anyone have any suggestions on how I can accomplish this feat? Thanks for any input.
Doug
I thought that it would be a simple matter to use a named anchor to Hyperlink to a specific row of a table. Apparently it's not as easy as I thought. Anyone have any suggestions on how I can accomplish this feat? Thanks for any input.
Doug
You need to use ids. The #
sign inside the href
attribute means the link will go to the same page starting where the id is. You then need to add the same row name to your tr
element.
<a href="#my-row">Go to Row</a>
<tr id="my-row">
Link to a Fragment - link It is often usefull to link to other places on the same webpage, such as other sections or chapters further down the page.
The technical term for this is linking to a Fragment, where browsers will automatically try and scroll to that part of the page.
Fragments first need to be defined somewhere in a webpage by giving them a name, for example , then links to this fragment are created by using the hash (#) character: Link.
To link to a fragment on another page you would simply append the fragment name to the address, for example: href="example.html#fragment_name".