html codes, please help?

  • Thread starter Thread starter Fay B
  • Start date Start date
F

Fay B

Guest
I am creating a website as a final project for my html coding class.

I have images to post on the website and I need to include a name for each image to the left of each the image's name.

Can you please tell me how to insert text next to an image?

Thanks.
 
Type it right before the opening tag.
If you don't know this, you are going to fail HTML.

You may want to put your image in a table. (two columns). Image in one, text in the second.

Or create two <DIV>'s next to each other.

Of all of them, I think I like the table best.
 
One way is,

< p >
< img src="whatever.jpg" alt="My pic."
height="100" width="100"
style="display:inline;float:right; margin: 1em;" />
Your caption goes here.
< /p >

Another is,

< dl >
< dt style="float:right; margin:-2em 1em 1em 1em;">

< img src="whatever.jpg" alt="My pic."
height="100" width="100" />
< /dt >
< dd > Your caption goes here < /dd >
< /dl >

In the second example you may have to play with the "-2em" figure to get the pic to line up with the caption the way you want it.
 
One way is,

< p >
< img src="whatever.jpg" alt="My pic."
height="100" width="100"
style="display:inline;float:right; margin: 1em;" />
Your caption goes here.
< /p >

Another is,

< dl >
< dt style="float:right; margin:-2em 1em 1em 1em;">

< img src="whatever.jpg" alt="My pic."
height="100" width="100" />
< /dt >
< dd > Your caption goes here < /dd >
< /dl >

In the second example you may have to play with the "-2em" figure to get the pic to line up with the caption the way you want it.
 
Back
Top