0

Hi

I'm starting to learn html/css. I have a issue of breaking a caption in the alt into 2 lines.

This is my image example

<img src="images/Tom3.jpg" width="400" height="400" alt="Image is ... yada .. whatever" />

I want the caption in the alt stop at width 400 of the image and go back to the front width 1

I hope that make sense. I try to used <br> but it didn't work. Any suggestions?

3
Contributors
7
Replies
9
Views
5 Years
Discussion Span
Last Post by LastMitch
0

alt is for displaying a text when the image isn't loaded. It is not meant to be a hint. If you do not like the tooltip that the browser is showing (title attribute), you'll have to build your own.

0

The alt tab is also useful for supplying search engine spiders with information about what the image file represents.

What exactly are you trying to accomplish with this text?

0

@pritaeas

alt is for displaying a text when the image isn't loaded. It is not meant to be a hint. If you do not like the tooltip that the browser is showing (title attribute), you'll have to build your own.

Thanks for the reply! I apologized for not explain it clearly. I attached an image to show what I want to do.

How do I make that word "Break" go to the second line.

Do I need to used CSS to make it work? My <div> doesn't have any CSS in it.

215

0

@JorgeM

The alt tab is also useful for supplying search engine spiders with information about what the image file represents.

What exactly are you trying to accomplish with this text?

Thanks for the reply! No, it has nothing to do with search engine. I attach a image to show what I want to do.

1

Do I need to used CSS to make it work? My <div> doesn't have any CSS in it.

Just make that div the same width as the image.

Votes + Comments
Thanks for the suggestion!
0

@pritaeas

Just make that div the same width as the image.

Thanks for the suggestion! I will make the adjustment now!

Edited by LastMitch: grammer

1

@pritaeas

It work! The word "break" is on the second line now! I appreciate it your help! Thanks!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.