Logo
  Sunday, May 20, 2012
Sign-In  |  Sign-Up  |  Contact Us  | Bookmark |  RSS Feed

HTML5 Tutorial FeedBurner

The HTML5 <iframe> Tag  
There are times when inserting or embedding another document within an HTML document is necessary. During such occasions, using HTML5 <iframe> tag is quite handy. The HTML5 <iframe> tag is the tool that is used for emphasizing and adding an inline frame.

The <iframe> tag is also used in HTML4.01. However, it has to be noted that using this tag in HTML4.01 and HTML5 is not the same. There are several new attributes that are added in HTML5. On the other hand, some of the ones used for HTML 4.01 are already considered obsolete and are not incorporated in HTML5.

Since some of the attributes in HTML4.01 is no longer used for HTML5, it is necessary to incorporate CSS techniques when adding style to the <iframe> tag. This is the standard for HTML5 even when it comes to adding scrollbars.

The attributes for the HTML5 <iframe> tag are the following:

Attribute

Value

Description

frameborder

1
0

This is no longer recognized or supported in HTML5

height

pixels

This determines what will be the height of the iframe that is used within the document

longdesc

URL

This is no longer recognized or supported in HTML5

marginheight

pixels

This is no longer recognized or supported in HTML5

marginwidth

pixels

This is no longer recognized or supported in HTML5

name

name

When providing a name for the iframe, this is what should be used

sandbox (NEW)

""
allow-forms
allow-same-origin
allow-scripts
allow-top-navigation

When the author of the document has to put restriction for the content within the iframe, this has to be added

scrolling

yes
no
auto

This is no longer recognized or supported in HTML5

Seamless (NEW)

seamless

This ensures that the iframe will not pop out from the rest of the document. It is the key in ensuring that the look of the iframe is patterned after all other parts of the HTML document

src

URL

It is the indicator as to where the iframe is embedded

srcdoc (NEW)

HTML_code

This enables the HTML document to identify which content within the page has to be incorporated in the iframe

width

pixels

It determines what the width of the iframe would be

The good thing about HTML <iframe> tag is that author would not have a hard time using it since it also supports both the Global Attributes and Events Attributes in HTML5. It is also compatible with the major web browsers that are commonly used in different computers and mobile devices these days like the Safari, Opera, Google Chrome, Internet Explorer and Firefox.

Print HTML5 <iframe> Tag Bookmark HTML5 <iframe> Tag

Related Articles  
The HTML5 <tfoot> Tag
The HTML5 <tfoot> tag is utilized in grouping footer within an HTML document. The HTML5 <tfoot> tag is ...
The HTML5 <small> Tag
If there are smaller texts and side comments that have to be placed in the HTML document, the HTML5 <small> tag ...
The HTML5 <tbody> Tag
Grouping the body content for tables that are included within the HTML document is necessary. Hence the use of HTML5 ...
The HTML5 <font> Tag
The <font> tag is not utilized in HTML5. To be able to change the details and aesthetics of text, it would be ...
The HTML5 <script> Tag
The HTML5 <script> tag is incorporated within a document to be able to specify a client side script. An example ...
The HTML5 <progress> Tag
Using the HTML5 <progress> tag is not as easy as utilizing other tags for HTML5. It has limited compatibility ...
More