- HTML Tutorial
- HTML - Home
- HTML - Introduction
- HTML - Editors
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Headings
- HTML - Paragraphs
- HTML - Fonts
- HTML - Blocks
- HTML - Style Sheet
- HTML - Formatting
- HTML - Quotations
- HTML - Comments
- HTML - Colors
- HTML - Images
- HTML - Image Map
- HTML - Iframes
- HTML - Phrase Elements
- HTML - Meta Tags
- HTML - Classes
- HTML - IDs
- HTML - Backgrounds
- HTML Tables
- HTML - Tables
- HTML - Headers & Caption
- HTML - Table Styling
- HTML - Table Colgroup
- HTML - Nested Tables
- HTML Lists
- HTML - Lists
- HTML - Unordered Lists
- HTML - Ordered Lists
- HTML - Definition Lists
- HTML Links
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML Color Names & Values
- HTML - Color Names
- HTML - RGB
- HTML - HEX
- HTML - HSL
- HTML Forms
- HTML - Forms
- HTML - Form Attributes
- HTML - Form Control
- HTML - Input Attributes
- HTML Media
- HTML - Video Element
- HTML - Audio Element
- HTML - Embed Multimedia
- HTML Header
- HTML - Head Element
- HTML - Adding Favicon
- HTML - Javascript
- HTML Layouts
- HTML - Layouts
- HTML - Layout Elements
- HTML - Layout using CSS
- HTML - Responsiveness
- HTML - Symbols
- HTML - Emojis
- HTML - Style Guide
- HTML Graphics
- HTML - SVG
- HTML - Canvas
- HTML APIs
- HTML - Geolocation API
- HTML - Drag & Drop API
- HTML - Web Workers API
- HTML - WebSocket
- HTML - Web Storage
- HTML - Server Sent Events
- HTML Miscellaneous
- HTML - MathML
- HTML - Microdata
- HTML - IndexedDB
- HTML - Web Messaging
- HTML - Web CORS
- HTML - Web RTC
- HTML Demo
- HTML - Audio Player
- HTML - Video Player
- HTML - Web slide Desk
- HTML Tools
- HTML - Velocity Draw
- HTML - QR Code
- HTML - Modernizer
- HTML - Validation
- HTML - Color Picker
- HTML References
- HTML - Cheat Sheet
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
- HTML Resources
- HTML - Quick Guide
- HTML - Useful Resources
- HTML - Color Code Builder
- HTML - Online Editor
HTML - <object> Tag
The <object> tag in HTML is used to show multimedia on web pages, including audio, video, pictures, webisite, PDFs, and Flash.
Additionally, another website may be displayed inside the HTML page using this technique.
To define various parameters, the <param> tag is additionally used with this tag. Any text contained between the <object> tags is considered as alternative text, which is displayed when the browser does not support the data supplied.
Syntax
<object data="" type=""></object>
Attribute
HTML summary tag supports Global and Event attributes of HTML. Acceppts some specific attributes as well which are listed below.
Attribute | Value | Description |
---|---|---|
data | URL | Specify the url of resorce which will be used into object. |
form | form_id | Specify the belging form of the object. |
height | pixels | Define the height of the object. |
name | name | specify the name of the object. |
type | media_type | Specifies the media type of data specified in the data attribute |
width | pixels | Define the width of the object. |
Examples of HTML object Tag
Bellow examples will illustrate the usage of object tag. Where, when and how to use object tag to object image, html page, video or audio.
Embeding image using object Tag
Let’s look at the basic example where we are going to use an image on the webpage. We recomend you to use <img> tag to display images.
<!DOCTYPE html> <html> <head> <title>HTML object Tag</head> </head> <body> <object data="/html/test.jpg" type="text/html" width="300" height="200"> alt : <a href="/html/images/logo.png">test.jpg</a> </object> </body> </html>
Embeding video using object Tag
Consider another scenario where we are going to use the HTML <embed> tag to use a video. We recomend you to use <video> tag to display video.
<!DOCTYPE html> <html> <head> <title>HTML object Tag</head> </head> <body> <object height="250" width="500" data= "https://cdn.pixabay.com/vimeo/497754241/laptop-61037.mp4?width=640&hash=d25d7f4b8afa862b3252bdaeaf157934ceb1bb72"> </object> </body> </html>
Embeding html page using object Tag
Consider another scenario where we are going to use the HTML <embed> tag to use a html page. We recomend you to use <iframe> tag to display html page.
<!DOCTYPE html> <html> <head> <title>HTML object Tag</head> </head> <body> <object data="index.htm" width="500" height="200"> </body> </html>
Supported Browsers
Tag | |||||
---|---|---|---|---|---|
embed | Yes | Yes | Yes | Yes | Yes |
To Continue Learning Please Login
Login with Google