W3C home > Mailing lists > Public > www-html@w3.org > December 2004

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

From: <teklund@gargile.net>
Date: Wed, 22 Dec 2004 00:54:22 +0000
Message-ID: <20041218205535.72330.qmail@nuoli.com>
To: www-html@w3.org




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 Thursday, 23 December 2004 21:36:55 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:16:01 GMT