[thelist] image in <p> (was "random image...")

aardvark roselli at earthlink.net
Mon Jul 3 16:54:48 CDT 2000


> From: "rudy limeback" <r937 at interlog.com>
>
> > ... putting a <p> in there [<blockquote>] would be wrong...
> 
> no, it would be right
> 
> what if the quote consists of two paragraphs?

ah, well, i try to not nest my block-level tags... so i would use a 
couple <br> tags if i wanted it broken up... or perhaps to 
<blockquotes>, or maybe even a <p>...

but will that validate?  you can't have a <h#> inside a <p>...

> what about structuring it like this:
> 
>   <div class="image">
>   <img src="images/image1.gif" alt="image1" width="100" height="100"
>   /> <p> a caption which relates to the image </p> </div>

or:

<p>
<img src="images/image1.gif" alt="image1" width="100" height="100"><br>
caption.
</p>

is just as kosher... assuming you can nest block-level elements... 
which according to W3C, you can, i just try to be conservative on 
that if possible...

> sure there are valid reasons for an image to be inline, inside some
> text -- those little icons, for example, that indicate whether a link
> is offsite or is a pdf or whatever -- i'm just not convinced it's
> always as cut-and-dry as it at first seems, most images just aren't
> inline...

well, you can embed CSS as well as the deprecated 'align' property 
to align the image in the text... just because an image as aligned 
left or right doesn't make it block level, and aligned images are still 
inline... all text that wraps around an image wraps an inline image, 
or it couldn't wrap...  if you don't align it, it's still inline...

> i still like the <div> approach and would leave it in place because it
> means you can delete the caption and expect everything to still
> work...

but, she's not gonna delete...

i could delete an abbreviation, and i'd take the <abbr> with it, i 
would hope... orphaning markup isn't keen, so you *should* remove 
related markup when you remove content... using the <div> is just 
a shortcut...

it's really coding styles... i won't use a <span> or a <div> unless i 
have a damn good reason why no other contextual tag will do it... 
after all, once you do that, all you're doing is embedding a tag to 
style, which means you're still coding based on style, almost like 
using <font> tags, while telling yourself you've separated content 
from style because you *aren't* using <font> tags... but you haven't 
separated anything...

i've noticed a few sites repalce all their <font> with <span>, and 
then tell themselves they've split the content and the style... they 
haven't... they're just kidding themselves...






More information about the thelist mailing list