8 jul 2010

HTML iframe tag

Definition and Usage


The <iframe> tag defines an inline frame that contains another document.




Browser Support


Internet Explorer Firefox Opera Google Chrome Safari


The <iframe> tag is supported in all major browsers.




Differences Between HTML and XHTML


NONE




Tips and Notes


Tip: To deal with browsers that do not understand iframes, place the text you want between the opening <iframe> tag and the closing </iframe> tag.




Optional Attributes


DTD indicates in which HTML 4.01/XHTML 1.0 DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset.

Attribute Value Description DTD
align left
right
top
middle
bottom
Deprecated. Use styles instead.
Specifies the alignment of an iframe according to surrounding elements
TF
frameborder 1
0
Specifies whether or not to display a border around an iframe TF
height pixels
%
Specifies the height of an iframe TF
longdesc URL Specifies a page that contains a long description of the content of an iframe TF
marginheight pixels Specifies the top and bottom margins of an iframe TF
marginwidth pixels Specifies the left and right margins of an iframe TF
name name Specifies the name of an iframe TF
scrolling yes
no
auto
Specifies whether or not to display scrollbars in an iframe TF
src URL Specifies the URL of the document to show in an iframe TF
width pixels
%
Specifies the width of an iframe TF


Standard Attributes

The <iframe$gt; tag supports the following standard attributes:

Attribute Value Description DTD
class classname Specifies a classname for an element TF
id id Specifies a unique id for an element TF
style style_definition Specifies an inline style for an element TF
title text Specifies extra information about an element TF

More information about Standard Attributes.


Event Attributes

According to the W3C, the <iframe> tag does not support any event attributes.

However, the onload event is supported in all browsers.

More information about Event Attributes.

5 jul 2010

CSS display property

Definition and Usage

The display property specifies the type of box an element should generate.

Default value: inline
Inherited: no
Version: CSS1
JavaScript syntax: object.style.display="inline"


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The display property is supported in all major browsers.

Note: No versions of Internet Explorer (including IE8) support the property values "inline-table", "run-in", "table", "table-caption", "table-cell", "table-column", "table-column-group", "table-row", or "table-row-group".



Property Values


)
Value Description
none The element will generate no box at all
block The element will generate a block box (a line break before and after the element)
inline The element will generate an inline box (no line break before or after the element). This is default
inline-block The element will generate a block box, laid out as an inline box
inline-table The element will generate an inline box (like <table>, with no line break before or after)
list-item The element will generate a block box, and an inline box for the list marker
run-in The element will generate a block or inline box, depending on context
table The element will behave like a table (like <table>, with a line break before and after)
table-caption The element will behave like a table caption (like <caption>)
table-cell The element will behave like a table cell
table-column The element will behave like a table column
table-column-group The element will behave like a table column group (like
table-footer-group The element will behave like a table footer row group
table-header-group The element will behave like a table header row group
table-row The element will behave like a table row
table-row-group The element will behave like a table row group
inherit Specifies that the value of the display property should be inherited from the parent element