HTML Basics

HTML Introduction HTML Basic HTML Comments HTML Tags/Elements HTML Attributes HTML Formatting HTML Block and Inline HTML Charsets HTML Classes HTML Colors HTML Div HTML Headings HTML Id HTML Iframes HTML Images HTML File Paths HTML Tables HTML Layout HTML Lists HTML Links <a> HTML Paragraphs HTML Quotations HTML JavaScript HTML Emojis HTML URL Encode HTML Entities HTML Computercode HTML Symbols HTML Styles

HTML Forms

HTML Forms HTML Form Elements HTML Form Attributes HTML Input Attributes HTML Input Regex HTML Input Form Attributes HTML Input Types

HTML SEO

HTML Head HTML Page Title HTML Responsive HTML Semantics HTML Favicon

HTML Graphics

HTML Canvas HTML SVG

HTML Media

HTML Media HTML Audio HTML Video

HTML Reference

a abbr acronym address applet area article aside audio b base basefont bdi bdo big blockquote body br button canvas caption center cite code col colgroup data datalist dd del details dfn dialog dir div dl DOCTYPE dt em embed fieldset figcaption figure font footer form frame frameset h1_-_h6 head header hgroup hr html i iframe img input ins kbd label legend li link main map mark menu meta meter nav noframes noscript object ol optgroup option output p param picture pre progress q rp rt ruby s samp script search section select small source span strike strong style sub summary sup svg table tbody td template textarea tfoot th thead time title tr track tt u ul var video wbr

HTML <object> Tag

The HTML <object> tag is used to embed external resources such as images, videos, or interactive content into an HTML document. It allows you to include objects from external sources directly within your webpage. This can be useful for displaying media content, interactive applications, or other types of resources.

Example:

<object data="example.jpg" type="image/jpeg">
  Your browser does not support the object tag.
</object>

In the above example, an image file example.jpg is embedded into the HTML document using the <object> tag. The data attribute specifies the URL of the external resource, and the type attribute defines the type of the object (in this case, an image file of type JPEG).

Main Attributes of the <object> Tag:

Attribute Description
data Specifies the URL of the external resource to be embedded.
type Specifies the MIME type of the resource being embedded.
width Sets the width of the embedded object in pixels or as a percentage of the parent container.
height Sets the height of the embedded object in pixels or as a percentage of the parent container.
name Specifies a name for the embedded object, which can be used for scripting purposes.
align Specifies the alignment of the embedded object relative to the surrounding content.

These are some of the main attributes of the <object> tag that can be used to customize how the external resource is displayed within the webpage.

Summary:

In this tutorial, we have learned about the HTML <object> tag and how it can be used to embed external resources into an HTML document. We have also discussed some of the main attributes of the <object> tag and how they can be used to customize the appearance and behavior of the embedded object.