Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 951383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:43:40+00:00 2026-05-15T23:43:40+00:00

I have the following: <td> some text <div>a div</div> </td> I’d like to make

  • 0

I have the following:

<td>
  some text
  <div>a div</div>
</td>

I’d like to make the entire <td>...</td> a hyperlink. I’d prefer without the use of JavaScript. Is this possible?

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T23:43:40+00:00Added an answer on May 15, 2026 at 11:43 pm

    Yes, that’s possible, albeit not literally the <td>, but what’s in it. The simple trick is, to make sure that the content extends to the borders of the cell (it won’t include the borders itself though).

    As already explained, this isn’t semantically correct. An a element is an inline element and should not be used as block-level element. However, here’s an example (but JavaScript plus a td:hover CSS style will be much neater) that works in most browsers:

    <td>
      <a href="http://example.com">
        <div style="height:100%;width:100%">
          hello world
        </div>
      </a>
    </td>
    

    PS: it’s actually neater to change a in a block-level element using CSS as explained in another solution in this thread. it won’t work well in IE6 though, but that’s no news 😉

    Alternative (non-advised) solution

    If your world is only Internet Explorer (rare, nowadays), you can violate the HTML standard and write this, it will work as expected, but will be highly frowned upon and be considered ill-advised (you haven’t heard this from me). Any other browser than IE will not render the link, but will show the table correctly.

    <table>
        <tr>
            <a href="http://example.com"><td  width="200">hello world</td></a>
        </tr>
    </table>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a long line like this: <div class=interesting>This is interesting1</div><div class=not interesting>Some text</div><div
I have the following HTML like <body> <div class=myCool>blah</div> <div class=cool>some text</div> <div class=cool>some
I have the following div <body> <span style=border:1px solid red; display:inline-block> Some text<br />
I have the following html <div class=someClass> Some text </div> <div class=someClass> Some other
I have a the following html code: <div class=panel>Some Text Here</div> With the following
I have following code (live: http://jsfiddle.net/xyZY8/1/ ): var str = '<div>hello</div><ul><li>Some text...</li>' + '<li>second
i have the following scenary: <div class=maindiv> <div class=msg>some text</div> ... <div class=msg>some other
Let's say I have the following. <div class=foo> <div> some text <div class=bar> </div>
If you have the following divs: <div class=container> <div class=something>some text</div> </div> <div class=container>
I have the following code: <iframe> <div id=inner_div> Here's some text! </div> </iframe> I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.