w3-video.com logo

HTML5 Tutorial

Home HTML5 XAMPP .htaccess Firefox Notepad++

Share it

iframe name attribute

The name attribute on the iframe element:


3.name=a valid browsing-context name type text<iframe name="some_name"> ... <⁄iframe>

Video demonstration iframe name attribute

HTML5 iframe name attribute Tutorial

min video details
00:00 video tutorial: name attribute on iframe element
00:09 we have a link and an inline frame on page: the link (wikipedia.org) will open inside the same browsing context (=the same window), default behaviour because we did not add a specific target
00:18 now let's target the iframe (the link wikipedia.org) will open inside the iframe
00:29 naming the iframe through name attribute ("ifr1" - a value, our choice)
00:36 using the value of the name attribute from iframe element as value of target attribute from a element → the linked page (wikipedia.org) targets the iframe (wikipedia.org will load inside page's iframe)
00:48 name attribute on iframe element allows you to specify a valid browsing-context name
this name can then be used to target that nested browsing-context
00:57 <base target="ifr1"> (see HTML base element) will make all links in page to target the iframe (= to open inside it) except the links that have the target attribute present and a different browsing-context specified
iframe intro iframe browser display iframe parents - children iframe src vs srcdoc iframe syntax iframe width, height attributesiframe sandbox attributeiframe seamless attributeiframe src attributeiframe srcdoc attribute