Jump to content

I need some help with an alt tag for an image.


Recommended Posts

I need some help with an alt tag for an image. I can't get it to show up, your help will be appreciated. This is my code inside a div. I need it to show up when you move your mouse over the image like it would normally do.

Because of the php code I can't seem to find out how to do it.

 

 

<div style="float: left;"><a href="tn1_1.php?search=<?php echo $title; ?>"><img src="<?php echo $tn; ?>"><h4><?php echo $title; ?></h4></a></div>

The text that displays when you leave the cursor over an image doesn't go in the alt= attribute, it goes in the title= attribute, which isn't even present in your <img> tag set.

<div style="float: left;">
<a href="tn1_1.php?search=<?php echo $title; ?>">
<img src="<?php echo $tn; ?>" title="<?php echo $title; ?>" alt="<?php echo $title; ?>" />
<h4><?php echo $title; ?></h4>
</a>
</div>

 

I Think thats what you are after ...

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.