This can be used as the value of the target attribute of an or element, or the formtarget attribute of an or element. name A name for the embedded browsing context (or frame). This allows for a web browser UI to be implemented entirely with web technology, given the right permissions. This means that window.top, window.parent, ameElement, etc. mozbrowser Only available on Firefox OS Indicates that the frame is to appear like a top-level browser window to the embedded content. If this isn't set, the element can't be placed into full screen mode. In Chrome 17 or later (and maybe earlier), this attribute can be set to true if the frame is allowed to be placed into full screen mode by calling its element.webkitRequestFullScreen() method. webkitallowfullscreen Use allowfullscreen instead. In Gecko 9.0 or later, this attribute can be set to true if the frame is allowed to be placed into full screen mode by calling its element.mozRequestFullScreen() method. mozallowfullscreen Use allowfullscreen instead. marginwidth HTML 4 only The amount of space in pixels between the frame's content and its left and right margins. marginheight HTML 4 only The amount of space in pixels between the frame's content and its top and bottom margins. Due to widespread misuse, this is not helpful for non-visual browsers. longdesc HTML 4 only A URI of a long description of the frame. height Indicates the height of the frame HTML5 in CSS pixels, or HTML 4.01 in pixels or as a percentage. The value 0 tells the browser not to draw a border between this frame and other frames. frameborder HTML 4 only The value 1 (the default) tells the browser to draw a border between this frame and every other frame. allowpaymentrequest This attribute can be set to true if the frame should be allowed to invoke the Payment Request API. allowfullscreen This attribute can be set to true if the frame is allowed to be placed into full screen mode by calling its Element.requestFullscreen() method.
align Deprecated since HTML4.01, Obsolete since HTML5 The alignment of this element with respect to the surrounding context. This element includes the global attributes. None, both the starting and ending tag are mandatory.Īny element that accepts embedded content. Content categoriesįlow content, phrasing content, embedded content, interactive content, palpable content. The top-level browsing context (which has no parent) is typically the browser window. The browsing context that contains the embedded content is called the parent browsing context. Each browsing context has its own session history and active document. However, an can be used within a normal document body. In HTML 4.01, a document may contain a head and a body or a head and a frameset, but not both a body and a frameset. It is not safe to assume that the fullscreen button will appear by default without the allowfullscreen attribute.The HTML element represents a nested browsing context, effectively embedding another HTML page into the current page. However, YouTube often makes changes to the default behavior of embedded videos. At the time of this writing, you will notice that once the video is played, the fullscreen button is still displayed in the bottom-right hand corner.
HTML Code for iframe Without allowfullscreen AttributeĬonversely, here is the same HTML code without the allowfullscreen attribute:Īs before, here is what the code looks like when displayed to a user. Once the video is played, a fullscreen button is displayed in the bottom-right hand corner: Here is what the code looks like when displayed to a user. The following HTML code is used to embed a YouTube video into a webpage: HTML Code for iframe With allowfullscreen Attribute