Export (0) Print
Expand All

3.4 HTML 4.01 Test: Specify an image with an OBJECT element

Test case: http://www.w3.org/MarkUp/Test/HTML401/current/tests/13_3-BF-01.html

The specification states:

To include images, authors may use the OBJECT element or the IMG element.

The test case states:

Verify the codetype and classid attributes for OBJECT element.

Object code:

<p>A JPG image and PNG image, displayed via the OBJECT element, shall appear

after this sentence.</p>

<p>

<object classid="image.jpg" codetype="image/jpeg" ></object>

<p>

<object classid="image.png" codetype="image/png"></object>

Expected results:

A .jpg image followed by a .png image should appear after the opening sentence.

Actual results for all document modes (all versions):

An OBJECT element placeholder is rendered for each object instead of the expected images.

Conclusion:

For the first OBJECT element, the value of the classid attribute is set to image.jpg and the value of the codetype attribute is set to image/jpeg. This specifies that an image object of type jpeg should be displayed.

For the second OBJECT element, the value of the classid attribute is set to image.png and the value of the codetype attribute is set to image/png. This specifies that an image object of type png should be displayed.

Based on the actual results for both image types, Internet Explorer fails this test case for all document modes (all versions).

See Also

Section 2.1.25

Show:
© 2014 Microsoft