Alex Rivera | Logout

how do I give a link name to an html table row?

Asked 2011-09-23T14:45:00.203
16

I have a table with each row explaining something (an input command). In another place, I am saying from this state with that input command, you go that other state. What I want to do is to link the that input command to the appropriate row of the table. Imagine something like this:

...link to row number <a href="#row2">2</a>...

<table ...>
    <tr>
        <td>command</td>
        <td>description</td>
    <tr>
    <tr>
        <a name="row1"></a>
        <td>A</td>
        <td>input A</td>
    <tr>
    <tr>
        <a name="row2"></a>
        <td>B</td>
        <td>input B</td>
    <tr>
</table>

As you can see, I tried putting a <a name="row2"></a> in the <tr> block but that didn't work (it brings me to the top of the table)

Is what I want to do possible?

Edit
Report

1 Answer

1

Although non-intuitive for me, but I put the <a name="row2"></a> inside the first <td> block and it worked!

answered 2011-09-23T14:45:52.730

Your Answer