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


These code samples show how you could include an image in a XHTML 2 

 <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; }

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 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 30 April 2020 16:20:55 UTC