dcsimg
www.webdeveloper.com
Results 1 to 5 of 5

Thread: img or object?

  1. #1
    Join Date
    Jul 2006
    Posts
    3

    img or object?

    Hi guys,
    I'm currently trying to learn xhtml and have a question about the best way to insert images in my documents. The book I'm reading says that <img> is the most widley used but that the official xhtml specifications had intended for the <object> tag to takes it's place.

    Which should I be using in a best practice situation?

    Thanks

  2. #2
    Join Date
    Jun 2004
    Location
    England
    Posts
    2,972
    Both, the reason that the OBJECT element is non-empty is so that you can put alternate content inside, should the browser not be able to handle it.

  3. #3
    Join Date
    Aug 2006
    Posts
    167
    <img> tag should be sufficient and i haven't come across a browser that don't inteprete img tag, but if you want your code to be "nice", you can try <object><img></object>

  4. #4
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    I've got a better idea. Forget XHTML and learn something useful like HTML 4.01 Strict instead.

  5. #5
    Join Date
    Jun 2004
    Location
    England
    Posts
    2,972
    Quote Originally Posted by pacerier
    <img> tag should be sufficient and i haven't come across a browser that don't inteprete img tag
    Quote Originally Posted by ray326
    Forget XHTML and learn something useful like HTML 4.01 Strict instead.
    What on earth is the harm in learning both?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles