Hi,
It's been absolutely ages since I wrote any HTML and my memory needs jogging. I've checked out the reference here but it didn't answer my question.
My question is, when I insert an <img> in the markup (for example just the logo, nothing else), is it best to surround the <img> with <div> like so:
or just have the <img> stand alone like so:HTML Code:<div><img src="path/to/my/image.jpg" alt="Insert description here."></div>
I ask because I tried the second option and the validator threw up an error saying that I needed to surround it with a block level tag like <div>, <p>, etc. I thought that was weird seeing that it was just an image. Is it really necessary to surround all my images with <div>?HTML Code:<img src="path/to/my/image.jpg" alt="Insert description here.">







HTML 4.01 Strict is what all the cool kids do.

Bookmarks