Re: XHTML 2 - Which way should I insert images and other media?

Ugh... Um, I'd personally go with number 3.

Basically it's this:

1) Semantic value: the image. The image has markup (a header)
explaining its value if the image can't display. Not really ever
appropriate. Also here the <h1> is not the heading of it's parent
section.

2)  Semantic value: the image and the text. Both the text and the
image are semantically important. Imagine maps as headers. What
differentiates this from three is that the image is semantically
important (i.e. the meaning of the page would be different if it
wasn't there).

3) Semantic value: the text.  For this particular instance (i.e. the
header is simply the text W3C), this is probably most appropriate. The
text that labels this section is "W3C".

In your "W3C" header example there is no image that is needed to
communicate the semantic value of the text so example three is
probably your most appropriate choice.

On Wed, 22 Dec 2004 00:54:22 +0000, teklund@gargile.net
<teklund@gargile.net> wrote:
> 
> 
> Hi,
> 
> These code samples show how you could include an image in a XHTML 2
> document:
> 
>  <object src="logo.png" type="image/png"><h1>W3C</h1></object>
> 
>  <h1 src="logo.png" type="image/png">W3C</h1>
> 
> And with the help of CSS3, you could also do this:
> 
>  h1 { content: url(logo.png), contents; }
>  <h1>W3C</h1>
> 
> All code samples will give the same result. When should I use which method?
> 
>  - Tobias Eklund
> 
>

Received on Friday, 24 December 2004 02:43:38 UTC