0

I have a table that has 3 rows.

<a href="www.google.com">
<table style="width:100%">
  <tr>
    <td>Jill</td>
    <td>Smith</td>
    <td>50</td>
  </tr>

  <tr>
    <td>Eve</td>
    <td>Jackson</td>
    <td>94</td>
  </tr>

  <tr>
    <td>Non Clickable</td>
  </tr>
</table>
</a>

I want to make the 3rd row non clickable using HTML. Is it possible?

I do not wish to apply anchor tag inside each individual <td>.

Thanks in advance.

4
  • Why do you need to make text unclickable? What's the real goal? Commented Jun 21, 2021 at 14:41
  • 1
    How do think that this can be done when you added the whole table inside a tag ? Commented Jun 21, 2021 at 14:42
  • 2
    Having an entire table be a link is pretty strange to begin with. What are you trying to accomplish? Commented Jun 21, 2021 at 14:42
  • Do you mean make the 3rd table row non-clickable using Javascript? Commented Jun 21, 2021 at 14:44

1 Answer 1

1

You're basically asking: "Can I have some text inside an anchor tag be clickable and other text not clickable?" To which the answer is, "No, that's not how HTML works." By declaring an <a href="foo.html">...</a> tag, you're declaring that the entire content of that tag should be linked to foo.html.

It looks like you're going to have to put the links inside the table (and, really, you should have a link inside each <td>, annoying as that can be).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.