{"id":2611,"date":"2023-01-03T17:06:19","date_gmt":"2023-01-03T17:06:19","guid":{"rendered":"https:\/\/learnscripting.org\/?p=2611"},"modified":"2023-01-03T17:06:21","modified_gmt":"2023-01-03T17:06:21","slug":"html-object","status":"publish","type":"post","link":"https:\/\/learnscripting.org\/html-object\/","title":{"rendered":"HTML Object"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The <code>&lt;object&gt;<\/code> element in HTML is used to embed external resources, such as multimedia (e.g., audio, video, Java applets), in an HTML page. It can also be used to embed other types of documents, such as PDFs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>&lt;object&gt;<\/code> element is a container for the embedded resource, and it can have several attributes to specify the location of the resource and other properties of the object. The most important attributes are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>data<\/code>: This attribute specifies the URL of the resource to be embedded.<\/li>\n\n\n\n<li><code>type<\/code>: This attribute specifies the MIME type of resource.<\/li>\n\n\n\n<li><code>width<\/code> and <code>height<\/code>: These attributes specify the dimensions of the object.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Here is an example of how to use the <code>&lt;object&gt;<\/code> element to embed a PDF file in an HTML page:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>&lt;object data=\"myfile.pdf\" type=\"application\/pdf\" width=\"800\" height=\"600\">\n  &lt;p>It looks like you don't have a PDF plugin for this browser. You can &lt;a href=\"myfile.pdf\">click here to download the PDF file.&lt;\/a>&lt;\/p>\n&lt;\/object>\n<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">In this example, the <code>&lt;object><\/code> the element will attempt to load the PDF file at the URL &#8220;myfile.pdf&#8221; and display it in an 800&#215;600 pixel window. If the browser doesn&#8217;t have a PDF plugin, the fallback content (the <code>&lt;p><\/code> element) will be displayed instead.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can find more information about the <code>&lt;object&gt;<\/code> element in the HTML documentation.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The &lt;object&gt; element in HTML is used to embed external resources, such as multimedia (e.g., audio, video, Java applets), in an HTML page. It can also be used to embed other types of documents, such as PDFs. The &lt;object&gt; element is a container for the embedded resource, and it can have several attributes to specify &hellip;<\/p>\n","protected":false},"author":1,"featured_media":3453,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rop_custom_images_group":[],"rop_custom_messages_group":[],"rop_publish_now":"initial","rop_publish_now_accounts":{"facebook_2613112545524186_272996453239123":"","twitter_aTo5NzY3MTIyNTIwMzEwNTM4MjQ7_976712252031053800":""},"rop_publish_now_history":[],"rop_publish_now_status":"pending","footnotes":""},"categories":[13],"tags":[],"class_list":["post-2611","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-html"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>HTML Object - Learn Scripting<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/learnscripting.org\/html-object\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"HTML Object - Learn Scripting\" \/>\n<meta property=\"og:description\" content=\"The &lt;object&gt; element in HTML is used to embed external resources, such as multimedia (e.g., audio, video, Java applets), in an HTML page. It can also be used to embed other types of documents, such as PDFs. The &lt;object&gt; element is a container for the embedded resource, and it can have several attributes to specify &hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/learnscripting.org\/html-object\/\" \/>\n<meta property=\"og:site_name\" content=\"Learn Scripting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/profile.php?id=100064270142636\" \/>\n<meta property=\"article:published_time\" content=\"2023-01-03T17:06:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-01-03T17:06:21+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/learnscripting.org\/wp-content\/uploads\/2023\/01\/pic_htmltree.gif\" \/>\n\t<meta property=\"og:image:width\" content=\"486\" \/>\n\t<meta property=\"og:image:height\" content=\"266\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/gif\" \/>\n<meta name=\"author\" content=\"Shakti Das\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Shakti Das\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/learnscripting.org\\\/html-object\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/learnscripting.org\\\/html-object\\\/\"},\"author\":{\"name\":\"Shakti Das\",\"@id\":\"https:\\\/\\\/learnscripting.org\\\/#\\\/schema\\\/person\\\/71045e0c38b97ea7f76363d6effa320c\"},\"headline\":\"HTML Object\",\"datePublished\":\"2023-01-03T17:06:19+00:00\",\"dateModified\":\"2023-01-03T17:06:21+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/learnscripting.org\\\/html-object\\\/\"},\"wordCount\":175,\"publisher\":{\"@id\":\"https:\\\/\\\/learnscripting.org\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/learnscripting.org\\\/html-object\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/learnscripting.org\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/pic_htmltree.gif\",\"articleSection\":[\"Html\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/learnscripting.org\\\/html-object\\\/\",\"url\":\"https:\\\/\\\/learnscripting.org\\\/html-object\\\/\",\"name\":\"HTML Object - Learn Scripting\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/learnscripting.org\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/learnscripting.org\\\/html-object\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/learnscripting.org\\\/html-object\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/learnscripting.org\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/pic_htmltree.gif\",\"datePublished\":\"2023-01-03T17:06:19+00:00\",\"dateModified\":\"2023-01-03T17:06:21+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/learnscripting.org\\\/html-object\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/learnscripting.org\\\/html-object\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/learnscripting.org\\\/html-object\\\/#primaryimage\",\"url\":\"https:\\\/\\\/learnscripting.org\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/pic_htmltree.gif\",\"contentUrl\":\"https:\\\/\\\/learnscripting.org\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/pic_htmltree.gif\",\"width\":486,\"height\":266},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/learnscripting.org\\\/html-object\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/learnscripting.org\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"HTML Object\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/learnscripting.org\\\/#website\",\"url\":\"https:\\\/\\\/learnscripting.org\\\/\",\"name\":\"Learn Scripting\",\"description\":\"Coding Knowledge Unveiled: Empower Yourself\",\"publisher\":{\"@id\":\"https:\\\/\\\/learnscripting.org\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/learnscripting.org\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/learnscripting.org\\\/#organization\",\"name\":\"Learn Scripting\",\"url\":\"https:\\\/\\\/learnscripting.org\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/learnscripting.org\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/learnscripting.org\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/cropped-ls-600x600-1-512x512.jpg?fit=512%2C512&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/learnscripting.org\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/cropped-ls-600x600-1-512x512.jpg?fit=512%2C512&ssl=1\",\"width\":512,\"height\":512,\"caption\":\"Learn Scripting\"},\"image\":{\"@id\":\"https:\\\/\\\/learnscripting.org\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/profile.php?id=100064270142636\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/learnscripting.org\\\/#\\\/schema\\\/person\\\/71045e0c38b97ea7f76363d6effa320c\",\"name\":\"Shakti Das\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5492ae25bd62294799695759ba85aaa28ae3d1de6b30be7cbdc377abc2ea0aac?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5492ae25bd62294799695759ba85aaa28ae3d1de6b30be7cbdc377abc2ea0aac?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5492ae25bd62294799695759ba85aaa28ae3d1de6b30be7cbdc377abc2ea0aac?s=96&d=mm&r=g\",\"caption\":\"Shakti Das\"},\"sameAs\":[\"https:\\\/\\\/learnscripting.org\"],\"url\":\"https:\\\/\\\/learnscripting.org\\\/author\\\/53kgl\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"HTML Object - Learn Scripting","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/learnscripting.org\/html-object\/","og_locale":"en_US","og_type":"article","og_title":"HTML Object - Learn Scripting","og_description":"The &lt;object&gt; element in HTML is used to embed external resources, such as multimedia (e.g., audio, video, Java applets), in an HTML page. It can also be used to embed other types of documents, such as PDFs. The &lt;object&gt; element is a container for the embedded resource, and it can have several attributes to specify &hellip;","og_url":"https:\/\/learnscripting.org\/html-object\/","og_site_name":"Learn Scripting","article_publisher":"https:\/\/www.facebook.com\/profile.php?id=100064270142636","article_published_time":"2023-01-03T17:06:19+00:00","article_modified_time":"2023-01-03T17:06:21+00:00","og_image":[{"width":486,"height":266,"url":"https:\/\/learnscripting.org\/wp-content\/uploads\/2023\/01\/pic_htmltree.gif","type":"image\/gif"}],"author":"Shakti Das","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Shakti Das","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/learnscripting.org\/html-object\/#article","isPartOf":{"@id":"https:\/\/learnscripting.org\/html-object\/"},"author":{"name":"Shakti Das","@id":"https:\/\/learnscripting.org\/#\/schema\/person\/71045e0c38b97ea7f76363d6effa320c"},"headline":"HTML Object","datePublished":"2023-01-03T17:06:19+00:00","dateModified":"2023-01-03T17:06:21+00:00","mainEntityOfPage":{"@id":"https:\/\/learnscripting.org\/html-object\/"},"wordCount":175,"publisher":{"@id":"https:\/\/learnscripting.org\/#organization"},"image":{"@id":"https:\/\/learnscripting.org\/html-object\/#primaryimage"},"thumbnailUrl":"https:\/\/learnscripting.org\/wp-content\/uploads\/2023\/01\/pic_htmltree.gif","articleSection":["Html"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/learnscripting.org\/html-object\/","url":"https:\/\/learnscripting.org\/html-object\/","name":"HTML Object - Learn Scripting","isPartOf":{"@id":"https:\/\/learnscripting.org\/#website"},"primaryImageOfPage":{"@id":"https:\/\/learnscripting.org\/html-object\/#primaryimage"},"image":{"@id":"https:\/\/learnscripting.org\/html-object\/#primaryimage"},"thumbnailUrl":"https:\/\/learnscripting.org\/wp-content\/uploads\/2023\/01\/pic_htmltree.gif","datePublished":"2023-01-03T17:06:19+00:00","dateModified":"2023-01-03T17:06:21+00:00","breadcrumb":{"@id":"https:\/\/learnscripting.org\/html-object\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/learnscripting.org\/html-object\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/learnscripting.org\/html-object\/#primaryimage","url":"https:\/\/learnscripting.org\/wp-content\/uploads\/2023\/01\/pic_htmltree.gif","contentUrl":"https:\/\/learnscripting.org\/wp-content\/uploads\/2023\/01\/pic_htmltree.gif","width":486,"height":266},{"@type":"BreadcrumbList","@id":"https:\/\/learnscripting.org\/html-object\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/learnscripting.org\/"},{"@type":"ListItem","position":2,"name":"HTML Object"}]},{"@type":"WebSite","@id":"https:\/\/learnscripting.org\/#website","url":"https:\/\/learnscripting.org\/","name":"Learn Scripting","description":"Coding Knowledge Unveiled: Empower Yourself","publisher":{"@id":"https:\/\/learnscripting.org\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/learnscripting.org\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/learnscripting.org\/#organization","name":"Learn Scripting","url":"https:\/\/learnscripting.org\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/learnscripting.org\/#\/schema\/logo\/image\/","url":"https:\/\/i0.wp.com\/learnscripting.org\/wp-content\/uploads\/2022\/03\/cropped-ls-600x600-1-512x512.jpg?fit=512%2C512&ssl=1","contentUrl":"https:\/\/i0.wp.com\/learnscripting.org\/wp-content\/uploads\/2022\/03\/cropped-ls-600x600-1-512x512.jpg?fit=512%2C512&ssl=1","width":512,"height":512,"caption":"Learn Scripting"},"image":{"@id":"https:\/\/learnscripting.org\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/profile.php?id=100064270142636"]},{"@type":"Person","@id":"https:\/\/learnscripting.org\/#\/schema\/person\/71045e0c38b97ea7f76363d6effa320c","name":"Shakti Das","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/5492ae25bd62294799695759ba85aaa28ae3d1de6b30be7cbdc377abc2ea0aac?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/5492ae25bd62294799695759ba85aaa28ae3d1de6b30be7cbdc377abc2ea0aac?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5492ae25bd62294799695759ba85aaa28ae3d1de6b30be7cbdc377abc2ea0aac?s=96&d=mm&r=g","caption":"Shakti Das"},"sameAs":["https:\/\/learnscripting.org"],"url":"https:\/\/learnscripting.org\/author\/53kgl\/"}]}},"_links":{"self":[{"href":"https:\/\/learnscripting.org\/wp-json\/wp\/v2\/posts\/2611","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/learnscripting.org\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/learnscripting.org\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/learnscripting.org\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/learnscripting.org\/wp-json\/wp\/v2\/comments?post=2611"}],"version-history":[{"count":1,"href":"https:\/\/learnscripting.org\/wp-json\/wp\/v2\/posts\/2611\/revisions"}],"predecessor-version":[{"id":3454,"href":"https:\/\/learnscripting.org\/wp-json\/wp\/v2\/posts\/2611\/revisions\/3454"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/learnscripting.org\/wp-json\/wp\/v2\/media\/3453"}],"wp:attachment":[{"href":"https:\/\/learnscripting.org\/wp-json\/wp\/v2\/media?parent=2611"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/learnscripting.org\/wp-json\/wp\/v2\/categories?post=2611"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/learnscripting.org\/wp-json\/wp\/v2\/tags?post=2611"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}