I need help posting images

  • Thread starter gtavcfan
  • 6 comments
  • 370 views
2,185
United States
Seattle, WA
I know this sounds stupid, and sorry if there are any similar, but I really need to know, How do you put images in a web page? I've tried it before, but it doesn't work.
 
Code:
[b]<img src="[/b][i]relative or absolute URL to image[/i][b]" height="[/b][i]h[/i][b]" width="[/b][i]w[/i][b]" alt="[/b][i]alternate text for those using screenreaders[/i][b]" />[/b]
 
Originally posted by Sage
Code:
[b]<img src="[/b][i]relative or absolute URL to image[/i][b]" height="[/b][i]h[/i][b]" width="[/b][i]w[/i][b]" alt="[/b][i]alternate text for those using screenreaders[/i][b]" />[/b]

Thanks dude! you've helped me. I used to put:
<img: image name and location . type of image/img>
When I tried it it came out as a blank image, as if I didn't put anything.
 
Originally posted by Sage
Code:
[b]<img src="[/b][i]relative or absolute URL to image[/i][b]" height="[/b][i]h[/i][b]" width="[/b][i]w[/i][b]" alt="[/b][i]alternate text for those using screenreaders[/i][b]" />[/b]
Uh, I thought width and height were illegal in XHTML? alt also displays a tooltip when you hover over the image.

Say you have alt="Hi ma!", "Hi Ma!" will be pop up in a little tooltip when you hover over the image.
 
Originally posted by Shannon
Uh, I thought width and height were illegal in XHTML?
For everything else but images. In fact, I believe the W3C recommends that one always puts the dimensions within an image tag, so that the browser doesn't have to calculate it.

alt also displays a tooltip when you hover over the image.
Only IE/win (and maybe the Gecko browsers) do that though. If you want a "real" tooltip, then you put in the title attribute. :)
 
Oops, sorry, I was a bit wrong with my first statement. In addition to width and height being allowed for images, width is still allowed for col, colgroup, and table, and both width and height are allowed for object. They're invalid for everything else though.
 
Originally posted by Sage
For everything else but images. In fact, I believe the W3C recommends that one always puts the dimensions within an image tag, so that the browser doesn't have to calculate it.
I could've sworn the validator spew out an error when I added width and height to an img tag once. :irked:
 
Back