<img> deprecation

E

e n | c k m a

I think I read somewhere that the <img> tag will be deprecated in the newer
version(s) of (X)HTML? Is this true? If so, how are we expected to display
images in the future?

Thanks,
Nick.
 
J

Jukka K. Korpela

Toby A Inkster said:
What is not made clear on that page, is that effectively any
element can embed an image (or other external data). For example, I
could embed a sunset picture like this:

<p src="sunset.png">Sunsets are nice.</p>

You mean that the XHTML 2.0 _draft_ also contains the idea of using the
src attribute for generic inclusion, at
<http://www.w3.org/TR/xhtml2/mod-attribute-collections.html
#col_Embedding>
Apparently this competes with the <object> element, which would really
be a redundant and odd bird if the "embedding attribute" idea were
adopted.
This may seem a little curious, but it does make sense to use a
non-<object/> element to embed images sometimes.

Actually there would be little point in having both, especially since
<object> deviates from the patter (by using data="..." rather than
src="..." attribute). You could always use <span src="..."> or
when there's nothing more suitable said:
<h1 src="ourlogo.png">ACME Widgets</h1>

That would be interesting, since it would actually convey the message
that the content is the primary thing, and the src attribute just
specifies an external alternative. Useful as this might often be,
I don't think the idea will be adopted. It's too logical and not
logical enough, at the same time. (To be logical enough, it should let
the author specify a set of alternative external resources, such as
images in different formats and sizes, in a priority order, with
advisory titles. And you can't do that with XML attributes.)
 
H

Headless

Jukka said:
Actually there would be little point in having both, especially since
<object> deviates from the patter (by using data="..." rather than
src="..." attribute). You could always use <span src="..."> or
<div scr="..."> instead of <object>, when there's nothing more suitable
to attach the src attribute to.

Object tags can be nested in a cascade, no such thing with <div
src=""></div>.


Headless
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,831
Latest member
HealthSmartketoReviews

Latest Threads

Top