|Home | Web Design Tutorials | Free Graphics | Newsletter | Products | Specials | SEO | Sound Effects | Member Perks | Member Login|
HTML Object Tag Tutorial
Browser SupportThe HTML object tag was intended as a generic tag for embedding images, audio, video, Java, Flash, and other objects into a web page.
Because of a lack of browser support it never really caught on as a replacement for the <img> tag and <applet> tag.
And because the major browsers require different codes to load the same object type, a second blow has been dealt against the object element.
The object element does offer a solution. Similar to how the noscript tag shows content between the <noscript> and </noscript> tags if the browser can't execute the script, if an object isn't displayed the code between the <object> and </object> tags will be displayed.
This, however, can lead to an awful lot of extra work trying to include alternative codes for different browsers. Way more work than it's worth, especially if you just want to add images to a web page.
If you'd like more details about it than I'm going to include you'll find plenty of hair-pulling information here: W3C Objects, Images, and Applets . . . and here: W3C Object Element.
Here's some simple code for an image object:
<object data="images/picture.jpg" type="image/jpg"> This is what will show if the image can't be displayed. </object>
Yeah, that looks easy enough, but try embedding an object where lots of parameters are needed and different codes are required for different browsers.
If you see the ebook cover for Industrial Strength Link Building to the right then your browser is capable of rendering an image as an object using the code shown above. If you see a dopey smile, it isn't, you're seeing the alternative content.
Unless you really need to know about the object element, you're probably much better off sticking with the image element for compatability reasons and ease of use.
Based on your interest in this tutorial, you may also be interested in these related pages:
This concludes the HTML Object Tag Tutorial.
Check out SEO for YOU now!
Almost a NewsletterSubscribe today for exclusive website design tutorials and grab some free gifts to boot! Learn more, or subcribe below:
Did you know...The member's site has about 100 standards compliant HTML and CSS tutorials, 31 handy reference charts, reprintable content, web graphics, exclusive fonts, free software, free ebooks and more? All this for less than 9 cents a day! [ Details ]
Home | Web Design Tutorials | Free Graphics | Newsletter | Products | Specials | SEO | Sound Effects