The iframe element represents a nested browsing context
Notes
src
The src attribute gives the address of a page that the nested
browsing context
is to contain
The attribute, if present, must be a valid non-empty URL potentially surrounded
by spaces
srcdoc
Inline HTML to embed, overriding the src attribute
If a browser does not support the srcdoc attribute, it will fall
back to the URL in the src attribute
name
A targetable name for the embedded browsing
context
This can be used in the target attribute of
a
form
base
or the formtarget attribute of elements
input
button
or
the windowName param in window.open()
The name attribute, if present, must be a valid browsing context
name
The given value is used to name the nested browsing context.
When the browsing context is created, if the attribute is present, the browsing
context name must be set to the value of this attribute;
otherwise, the browsing context name must be set to the empty string.
To link to a browsing context from an anchor tag use target=name
(not target=id)
sandbox
The sandbox attribute, when specified, enables a set of extra
restrictions on any content hosted by the iframe
The value of the attribute can either be empty to apply all
restrictions,
or
space-separated tokens to lift particular
restrictions
Its value must be an unordered set of unique space-separated tokens that are
ASCII
case-insensitive.
Some allowed values are
allow-same-origin
allow-top-navigation
allow-forms
allow-scripts
seamless
Deprecated
width
The width of the frame in CSS pixels
Default is 300
height
The height of the frame in CSS pixels
Default is 150
iframe stands for inline frame! (If you want to center, may need to use
display:block!)