HTML Iframe Tag

The Iframe element in HTML creates an inline frame, the element is only allowed in the Transitional and Frameset document types.

Warning

Using Frames is usually a bad idea, especially when a simple division element can create same effect.

Attributes

Standard Attributes

Attribute:Value:Description:DTD:
AttrsOther AttributesId, class, style, titleTF
longdescURIlink to long description. TF
nameCharacter data.Name of frame for targetting.TF
srcURISource of frame content. TF
frameborder1|0Frame borders? TF
marginwidthPixelsThe margin width in Pixels. TF
marginheightPixelsThe margin height in Pixels. TF
scrollingyes | no| autoScroll bars? TF
aligntop | middle | bottom | left | center | rightvertical or horizontal alignmentTF
heightlengthframe heightTF
widthlengthframe widthTF

DTD. Defines which document type the attribute is allowed. S=Strict, T=Transitional, F=Frameset.

Example

<iframe 
src="/iframe.html"
width="100%">
</iframe>

The SRC attribute is required.

Post comment

Links that you insert are not nofollowed, but will be removed by admins if they are considered spam.

[url=Absolute URL for page]TITLE[/url]

You should insert code boxes around code examples, which will be automatically syntax highlighted.

[code1 html|css|javascript|php|sql]Your Code Here[/code1]

You may want to read our Privacy Policy before submitting your comment.