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?
You do one of two things:
1) Set the id attribute of the <tr>. <tr id="row2">...</tr>
OR
2) put the <a> element inside the <td> element. If you put any element inside a <table> but not inside a <th> or <td>, it'll get rendered before the entire table (try it with any element, the browser does its best to correct the invalid HTML)
Although non-intuitive for me, but I put the <a name="row2"></a> inside the first <td> block and it worked!
<tr>
<td><a name="row2"></a></td>
<td>B</td>
<td>input B</td>
<tr>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With