Responsive objects and plugins

The <object> tag defines a container for an external resource. This can be a web page, a picture, a media player, or a plug-in application.

It is better to use the <img> tag to embed a picture, <iframe> tag to embed HTML, and <video> and <audio> tags to embed media content.

Objects and plugins can resize as the viewport size changes so they do not overflow the viewport. This can be implemented by setting CSS max-width="100%" on the container. If the object or plugin allows resizing, it can fill the container completely.

The max-width property has no effect if the content is smaller than the maximum width.

The <object> tag was originally designed to embed browser Plug-ins. Plug-ins are computer programs that extend the standard functionality of the browser. Plug-ins have been used for many different purposes:

  • Run Java applets (no longer supported)
  • Run ActiveX controls (no longer supported)
  • Display Flash movies (no longer supported)
  • Display maps
  • Scan for viruses
  • Verify a bank id
Back to top