W3C home > Mailing lists > Public > public-html@w3.org > April 2007

Re: Let every element have a src attribute

From: Jeff Schiller <codedread@gmail.com>
Date: Wed, 4 Apr 2007 09:30:35 -0500
Message-ID: <da131fde0704040730j5976c730qcd3dd821b06e4c14@mail.gmail.com>
To: public-html@w3.org

On 4/4/07, Bruce Boughton <bruce@bruceboughton.me.uk> wrote:
> Jeff Schiller wrote:
> > Finally, I'm actually in favour of reducing some of many "document
> > containers" that HTML has (img, frame, iframe, object, applet, and um,
> > embed) - so to me, using <object> to represent an image with fallback
> > textual content helps streamline the language (I will admit that the
> > semantics of "an image" do get lost somewhat in HTML:object, which
> > could be a variety of things).  Why not discourage use of img and use
> > object for images going forward?  (Ok, maybe this is last is too
> > radical an idea)
> One (minor?) problem with using object as a generic tag for any type of
> non-textual content to be embedded is that it makes styling object types
> more difficult.  If imgs become objects, it makes it harder to specify
> that all images should have a border, unless of course our presentation
> markup language (CSS) can disambiguate object types based on some
> attribute of object *reliably* (e.g. @type).

Bruce, you raise a good point:

  object[type="image/png"], object[type="image/jpeg"] { border-style: solid; }

is nowhere as easy to type as:

  img { border-style: solid; }

And, of course, the type attribute is optional (the HTTP Content-Type
is what is really important).  This means authors would have to use a
class:

<object class="img" data="foo.png">...</object>

and then select on the class:

  img, object.img { border-style:solid; }

That's not too painful really...

I think a bigger concern is the default width/height - if you don't
specify the width/height on the object, the behavior is
browser-dependent, I think.

Jeff

>
> Otherwise I don't see any problems with migrating all embedded content
> to the object tag.  The speed with which the types of media author wish
> to embed changes suggests that it doesn't make sense to call some out
> (image, video) as special cases with their own elements; we will never
> be up-to-date with what authors want to embed.
Received on Wednesday, 4 April 2007 14:30:45 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:15:52 GMT