frameset -

 <  Day Day Up  >  


<frameset> - <kbd>

<frameset> (Frameset Definition)

This element is used to define the organization of a set of independent window regions known as frames as defined by the frame element. This element replaces the body element in framing documents.

Standard Syntax

 <frameset      class="class name(s)"      cols="list of columns"      id="unique alphanumeric identifier"      rows="list of rows"      style="style information"      title="advisory text">       </frameset> 

Attributes Defined by Internet Explorer

 border="pixels" (4)      bordercolor="color name  #RRGGBB" (4)      frameborder="no  yes  0  1" (4)      framespacing="pixels" (4)      lang="language code" (4)      language="javascript  jscript  vbs  vbscript" (4)      hidefocus="true  false" (5.5)      tabindex="number" (5.5)      unselectable="on  off" (5.5) 

Standard Events

 onload, onunload 

Events Defined by Internet Explorer

 onactivate, onafterprint, onbeforedeactivate, onbeforeprint, onbeforeunload,  onblur, oncontrolselect, ondeactivate, onfocus, onmove, onmoveend, onmovestart,  onresizeend, onresizestart, 

Element-Specific Attributes

border       This attribute sets the width in pixels of frame borders within the frame set. Setting border="0" eliminates all frame borders. This attribute is not defined in the HTML or XHTML specification but is widely supported.

bordercolor       This attribute sets the color for frame borders within the frame set using either a named color or a color specified in the hexadecimal #RRGGBB format.

cols       This attribute contains a comma-delimited list that specifies the number and size of columns contained within a set of frames. List items indicate columns from left to right. Column size is specified in three formats, which might be mixed. A column can be assigned a fixed width in pixels. It also can be assigned a percentage of the available width, such as 50%. Finally, a column can be set to expand to fill the available space by setting the value to * , which acts as a wildcard.

frameborder       This attribute controls whether or not frame borders should be displayed. Netscape supports no and yes values. Microsoft uses 1 and as well as no and yes .

framespacing       This attribute indicates the space between frames in pixels.

rows       This attribute contains a comma-delimited list that specifies the number and size of rows contained within a set of frames. The number of entries in the list indicates the number of rows. Row size is specified with the same formats used for columns.

Examples

 <!-- This example defines a frame set of three columns. The middle column is 50 pixels wide. The first and last columns fill the remaining space.  -->  <frameset cols="*,50,*">   <frame src="column1.html">   <frame src="column2.html">   <frame src="column3.html">   </frameset>  <!-- This example defines a frame set of two columns, one of which is 20% of the screen, and the other, 80%. -->  <frameset cols="20%, 80%">   <frame src="controls.html">   <frame src="display.html">   </frameset>  <!-- This example defines two rows, one of which is 10% of the screen,  and the other, whatever space is left. -->  <frameset rows="10%, *">   <frame src="adbanner.html" name="ad_frame">   <frame src="contents.html" name="content_frame">   </frameset>  

Compatibility

HTML 4 and 4.01 (frameset DTD)
XHTML 1.0 (frameset DTD)

Internet Explorer 2, 3, 4, 5, 5.5, 6
Netscape 2, 3, 4, 4.5-4.8, 6, 7
Opera 4-7

Notes

  • The content model says that the <frameset> tag contains one or more <frame> tags, which are used to indicate the framed contents. A <frameset> tag also might contain a <noframes> tag whose contents will be displayed by browsers that do not support frames.

  • The <frameset> tag replaces the <body> tag in a framing document, as shown here:

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">   <html xmlns="http://www.w3.org/1999/xhtml" lang="en">   <head>   <title>  Collection of Frames  </title>   <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />   </head>   <frameset cols="*,50,*">   <frame src="column1.htm" name="col1" />   <frame src="column2.htm" name="col2" />   <frame src="column3.htm" name="col3" />   <noframes>   <body>  Please visit our <a href="noframes.html">no frames</a> site.  </body>   </noframes>   </frameset>   </html>  

<h1> Through <h6> (Headings)

These tags implement six levels of document headings; <h1> is the most prominent and <h6> is the least prominent.

Standard Syntax

 <h1      align="center  justify  left  right"             (transitional only)      class="class name(s)"      dir="ltr  rtl"      id="unique alphanumeric identifier"      lang="language code"      style="style information"      title="advisory text">     </h1> 

Attributes Defined by Internet Explorer

 accesskey="key" (5.5)      contenteditable="false  true  inherit" (5.5)      disabled="false  true" (5.5)      hidefocus="true  false" (5.5)      language="javascript  jscript  vbs  vbscript" (4)      tabindex="number" (5.5)      unselectable="on  off" (5.5) 

Standard Events

 onclick, ondblclick, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove,  onmouseout, onmouseover, onmouseup, 

Events Defined by Internet Explorer

 onactivate, onbeforeactivate, onbeforecopy, onbeforecut, onbeforedeactivate,  onbeforeeditfocus, onbeforepaste, onblur, oncontextmenu, oncontrolselect, oncopy,  oncut, ondeactivate, ondrag, ondragend, ondragenter, ondragleave, ondragover,  ondragstart, ondrop, onfocus, onfocusin, onfocusout, onhelp, onlosecapture,  onmouseenter, onmouseleave, onmousewheel, onmove, onmoveend, onmovestart, onpaste,  onpropertychange, onreadystatechange, onresize, onresizeend, onresizestart,  onselectstart, ontimeerror 

Element-Specific Attributes

align       This attribute controls the horizontal alignment of the heading with respect to the page. The default value is left .

Example

  <h1 align="justify">  This is a Major Document Heading  </h1>   <h2 align="center=">  Second heading, aligned to the center  </h2>   <h3 align="right">  Third heading, aligned to the right  </h3>   <h4>  Fourth heading  </h4>   <h5 style="font-size: 20pt;">  Fifth heading with style information  </h5>   <h6>  The least important heading  </h6>  

Compatibility

HTML 2, 3.2, 4, 4.01
XHTML 1.0, 1.1, Basic

Internet Explorer 2, 3, 4, 5, 5.5, 6
Netscape 1, 2, 3, 4, 4.5-4.8, 6, 7
Opera 4-7

Notes

  • In most implementations , heading numbers correspond inversely with the six font sizes supported by the font element. For example, <h1> corresponds to <font size="6"> . The default font size is 3 . However, this approach to layout is not encouraged, and page designers should consider using styles to set even relative sizes.

  • HTML 3.2 supports only the align attribute. HTML 2 does not support any attributes for headings.

  • The strict definitions of HTML 4 and XHTML do not include support for the align attribute. Style sheet properties like text-align should be used instead.

<head> (Document Head)

This element indicates the document head that contains descriptive information about the HTML document as well as other supplementary information, such as style rules or scripts.

Standard Syntax

 <head      dir="ltr  rtl"      id="unique alphanumeric identifier"      lang="language code"      profile="url">     </head> 

Attributes Defined by Internet Explorer

 class="class name(s)" 

Events Defined by Internet Explorer

 onlayoutcomplete, onreadystatechange 

Element-Specific Attributes

profile       This attribute specifies a URL for a meta-information dictionary. The specified profile should indicate the format of allowed metadata and its meaning.

Example

  <head>   <title>  Big Company Home Page  </title>   <base href="http://www.bigcompany.com" />   <meta name="Keywords"content="BigCompany, SuperWidget" />   </head>   <head profile="http://www.bigcompany.com/metadict.xml">  

Compatibility

HTML 2, 3.2, 4, 4.01
XHTML 1.0, 1.1, Basic

Internet Explorer 2, 3, 4, 5, 5.5, 6
Netscape 1, 2, 3, 4, 4.5-4.8, 6, 7
Opera 4-7

Notes

  • The <head> tag must contain a <title> tag. It also might contain the <base> , <isindex> , <link> , <meta> , <script> , and <style> tags. Internet Explorer 4 supports the inclusion of the <basefont> tag in the <head> , but <basefont> has been deprecated under HTML 4.

  • Under the XHTML 1.0 specification, the head element no longer can be implied , but must be used in all documents.

  • Under XHTML 1.0, the closing </head> tag is mandatory.

  • The meaning of the profile attribute is somewhat unclear, and no browsers appear to support it in any meaningful way.

  • Internet Explorer may allow the < bgsound > tag within <head> .

  • HTML 2 and 3.2 support no attributes for this element.

<hr> (Horizontal Rule)

This element is used to insert a horizontal rule to visually separate document sections. Rules usually are rendered as a raised or etched line.

Standard Syntax

 <hr      align="center  left  right" (transitional only)      class="class name(s)"      dir="ltr  rtl"      id="unique alphanumeric identifier"      lang="language code"id="unique alphanumeric identifier"      noshade="noshade " (transitional only)      size="pixels" (transitional only)      style="style information"      title="advisory information"      width="percentage  pixels" />  (transitional only) 

Attributes Defined by Internet Explorer

 accesskey="key" (5.5)      color="color name  #RRGGBB" (4)      language="javascript  jscript  vbs  vbscript" (4)      hidefocus="true  false" (5.5)      tabindex="number" (5.5)      unselectable="on  off" (5.5) 

Standard Event Attributes

 onclick, ondblclick, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove,  onmouseout, onmouseover, onmouseup 

Events Defined by Internet Explorer

 onactivate, onbeforeactivate, onbeforecopy, onbeforecut, onbeforedeactivate,  onbeforeeditfocus, onbeforepaste, onblur, oncontextmenu, oncontrolselect, oncopy,  oncut, ondeactivate, ondrag, ondragend, ondragenter, ondragleave, ondragover,   ondragstart, ondrop, onfocus, onfocusin, onfocusout, onhelp, onlosecapture,  onmouseenter, onmouseleave, onmousewheel, onmove, onmoveend, onmovestart, onpaste,  onpropertychange, onreadystatechange, onresize, onresizeend, onresizestart,  onselectstart, ontimeerror 

Element-Specific Attributes

align       This attribute controls the horizontal alignment of the rule with respect to the page. The default value is left .

color       This attribute sets the rule color using either a named color or a color specified in the hexadecimal #RRGGBB format. This attribute currently is supported only by Internet Explorer.

noshade       This attribute causes the rule to be rendered as a solid bar without shading.

size       This attribute indicates the height in pixels of the rule.

width       This attribute indicates how wide the rule should be, specified either in pixels or as
a percent of screen width, such as 80%.

Examples

  <hr align="left" noshade="noshade" size="1" width="420" />   <hr align="center" width="100%" size="3" color="#000000" />  

Compatibility

HTML 2, 3.2, 4, 4.01
XHTML 1.0, 1.1

Internet Explorer 2, 3, 4, 5, 5.5, 6
Netscape 1, 2, 3, 4-4.7, 6, 7
Opera 4-7

Notes

  • The HTML 4.01 strict specification removes support for the align , noshade , size , and width attributes for horizontal rules. These effects are possible using style sheets.

  • XHTML 1.0 requires a trailing slash for this element: <hr /> .

<html> (HTML Document)

This element identifies an HTML or XHTML document.

Standard Syntax

 <html      dir="ltr  rtl"      id="unique alphanumeric identifier"      lang="language code"      xmlns="http://www.w3.org/1999/xhtml>     </html> 

Attributes Defined by Internet Explorer

 class="class name(s)" (4)      scroll="yes  no  auto" (6) 

Events Defined by Internet Explorer

 onlayoutcomplete, onmouseenter, onmouseleave, onreadystatechange 

Element-Specific Attributes

scroll       This attribute is used to set whether scroll bars should show for the document or not. The default value of auto puts in scroll bars as needed. This attribute, while documented by Microsoft, does not appear to work properly and should be avoided.

xmlns       This attribute declares a namespace for XML-based custom tags in the document. For XHTML, this value is always http://www.w3.org/1999/xhtml.

Example

  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">   <html xmlns="http://www.w3.org/1999/xhtml" lang="en">   <head>   <title>  Minimal Document  </title>   <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />   </head>   <body>   <p>  Hello world!  </p>   </body>   </html>  

Compatibility

HTML 2, 3.2, 4, 4.01
XHTML 1.0, 1.1, Basic

Internet Explorer 2, 3, 4, 5, 5.5, 6
Netscape 1, 1.1 , 2, 3, 4, 4.5-4.8, 6, 7
Opera 4-7

Notes

  • The html element is the first element in a document. Except for comments, the only tags it directly contains are <head> followed by either <body> or <frameset> .

  • Because it is the outermost tag in a document, the html element is called the root element.

  • Under the XHTML 1.0 specification, <html> can no longer be implied.

  • The <html> tag and its closing tag </html> are both mandatory under XHTML.

  • Under HTML 4 transitional, a version attribute is supported.

<i> (Italic)

Indicates that the enclosed text should be displayed in an italic typeface.

Standard Syntax

 <i      class="class name(s)"      dir="ltr  rtl"      id="unique alphanumeric identifier"      lang="language code"      style="style information"      title="advisory text">     </i> 

Attributes Defined by Internet Explorer

 accesskey="key" (5.5)       contenteditable="false  true  inherit" (5.5)      disabled="false  true" (5.5)      hidefocus="true  false" (5.5)      language="javascript  jscript  vbs  vbscript" (4)      tabindex="number" (5.5)      unselectable="off  on" (5.5) 

Standard Event Attributes

 onclick, ondblclick, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove,  onmouseout, onmouseover, onmouseup 

Events Defined by Internet Explorer

 onactivate, onbeforeactivate, onbeforecopy, onbeforecut, onbeforedeactivate,  onbeforeeditfocus, onbeforepaste, onblur, oncontextmenu, oncontrolselect, oncopy,  oncut, ondeactivate, ondrag, ondragend, ondragenter, ondragleave, ondragover,   ondragstart, ondrop, onfocus, onfocusin, onfocusout, onhelp, onlosecapture,  onmouseenter, onmouseleave, onmousewheel, onmove, onmoveend, onmovestart, onpaste,  onpropertychange, onreadystatechange, onresize, onresizeend, onresizestart,  onselectstart, ontimeerror 

Examples

 Here is some  <i>  italicized  </i>  text. This is also  <i style="color:red;" id="myItalic">  italic  </i>  . 

Compatibility

HTML 2, 3.2, 4, 4.01
XHTML 1.0, 1.1, Basic

Internet Explorer 4, 5, 5.5, 6
Netscape 4, 4.5-4.8, 6, 7
Opera 4-7

<iframe> (Floating Frame)

This element indicates a floating frame, an independently controllable content region that can be embedded in a page.

Standard Syntax (Transitional and Frameset Only)

 <iframe      align="bottom  left  middle  right  top"      class="class name(s)"      dir="ltr  rtl"      frameborder="1  0"      height="percentage  pixels"      id="unique alphanumeric identifier"      lang="language code"      longdesc="url of description"      marginheight="pixels"      marginwidth="pixels"      name="string"      scrolling="auto  no  yes"      src="url of frame contents"      style="style information"      title="advisory text"      width="percentage  pixels">     </iframe> 

Attributes Defined by Internet Explorer

 allowtransparency="false  true" (5.5)      application="yes" (5)      border="pixels" (4)      bordercolor="color name  #RRGGBB" (4)      datafld="name of column supplying bound data" (4)      datasrc="id of data source object supplying data" (4)      frameborder="no  yes  0  1" (4)      hidefocus="true  false" (5.5)      hspace="pixels" (4)      language="javascript  jscript  vbs  vbscript" (4)      security="restricted" (6)      tabindex="number" (5.5)      unselectable="on  off" (5.5)      vspace="pixels" (4) 

Standard Event Attributes

 onclick, ondblclick, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove,  onmouseout, onmouseover, onmouseup 

Events Defined by Internet Explorer

 onactivate, onafterupdate, onbeforedeactivate, onbeforeupdate, onblur,  oncontrolselect, ondeactivate, onerrorupdate, onfocus, onload, onmove, onmoveend,  onmovestart, onreadystatechange, onresizeend, onresizestart, ontimeerror 

Element-Specific Attributes

align       This attribute controls the horizontal alignment of the floating frame with respect to the page. The default is left .

allowtransparency       This Internet Explorer-specific attribute determines whether the < iframe> is transparent or opaque . The default value is false , which means it is opaque.

application       This Microsoft-specific attribute is used to indicate whether the contents of an < iframe> are to be considered an HTA application. HTA applications are applications that use HTML, JavaScript, and Internet Explorer, but are not limited to the typical type of security considerations of a Web page. Given its security implications, this attribute should only be set if the developer is familiar with HTAs.

border       This attribute specifies the thickness of the border in pixels.

bordercolor       This attribute specifies the color of the border.

datafld       This attribute specifies the column name from the data source object that supplies the bound data.

datasrc       This attribute indicates the id of the data source object that supplies the data that is bound to this element.

frameborder       This attribute determines whether the iframe is surrounded by a border. The HTML 4 specification defines to be off and 1 to be on. The default value is 1 . Internet Explorer also defines the values no and yes .

framespacing       This attribute creates additional space between the frames.

height       This attribute sets the floating frame's height in pixels.

hspace       This attribute specifies horizontal padding between the iframe and any contents that may flow around it.

longdesc       This attribute specifies the URL of a document that contains a long description of the frame's contents.

marginheight       This attribute sets the height in pixels between the floating frame's content and its top and bottom borders.

marginwidth       This attribute sets the width in pixels between the floating frame's content and its left and right borders.

name       This attribute assigns the floating frame a name so that it can be the target destination of hyperlinks .

scrolling       This attribute determines whether the frame has scroll bars. A yes value forces scroll bars; a no value prohibits them. The default value is auto .

security       This attribute sets the value indicating whether the source file of an iframe has security restrictions applied. The only allowed value is restricted .

src       This attribute contains the URL of the content to be displayed in the floating frame. If absent, the frame is blank.

vspace       This attribute specifies vertical padding between an iframe and any content that may flow around it.

width       This attribute sets the floating frame's width in pixels.

Example

 <iframe src="http://www.democompany.com" height="150" width="200"  name="FloatingFrame1">  Sorry, your browser doesn't support inline frames.  </iframe>  

Compatibility

HTML 4 (transitional)
XHTML 1.0 (transitional or frameset)

Internet Explorer 3, 4, 5, 5.5, 6
Netscape 6, 7
Opera 5-7

Notes

  • Under the HTML 4 strict specification, the iframe element is not defined. However, under XHTML transitional and XHTML frameset, iframe is allowed. XHTML 1.1 does not allow it either. Floating frames can be somewhat imitated using the div element and CSS positioning facilities.

  • When a browser does not understand an <iframe> tag, it displays the text included within it as an alternate rendering.

<ilayer> (Inflow Layer)

This Netscape 4-specific element allows the definition of overlapping content layers that can be positioned, hidden or shown, rendered transparent or opaque, reordered front to back, and nested. An inflow layer is a layer with a relative position that appears where it would naturally occur in the document, in contrast to a general layer , which might be positioned absolutely , regardless of its location in a document. The functionality of layers is available using CSS positioning, and page developers are advised not to use this element.

Syntax (Netscape 4 Only)

 <ilayer      above="layer"      background="url of image"      below="layer"      bgcolor="color name  #RRGGBB"      class="class name(s)"      clip="x1, y1, x2, y2"      height="percentage  pixels"      id="unique alphanumeric identifier"      left="pixels"      name="string"      pagex="pixels"      pagey="pixels"      src="url of layer contents"      style="style information"      top="pixels"      visibility="hide  inherit  show"      width="percentage  pixels"      z-index="number">     </ilayer> 

Element-Specific Attributes

above       This attribute contains the name of the layer to be rendered above the current layer.

background       This attribute contains the URL of a background image for the layer.

below       This attribute contains the name of the layer to be rendered below the current layer.

bgcolor       This attribute specifies a layer's background color. Its value can be either a named color or a color specified in the hexadecimal #RRGGBB format.

clip       This attribute specifies the clipping region or viewable area of the layer. All layer content outside that rectangle will be rendered as transparent. The clip rectangle is defined by two x,y pairs: top x , left y , bottom x , and right y . Coordinates are relative to the layer's origin point, 0,0 , in its top-left corner.

height       This attribute specifies the height of a layer in pixels or percentage values.

left       This attribute specifies, in pixels, the horizontal offset of the layer. The offset is relative to its parent layer if it has one or to the left page margin if it does not.

name       This attribute assigns the layer a name that can be referenced by programs in a client-side scripting language. The id attribute also can be used.

pagex       This attribute specifies the horizontal position of the layer relative to the browser window.

pagey       This attribute specifies the vertical position of the layer relative to the browser window.

src       This attribute is used to set the URL of a file that contains the content to be loaded into the layer.

style       This attribute specifies an inline style for the layer.

top       This attribute specifies, in pixels, the top offset of the layer. The offset is relative to its parent layer if it has one or the top page margin if it does not.

visibility       This attribute specifies whether a layer is hidden, shown, or inherits its visibility from the layer that includes it.

width       This attribute specifies a layer's width in pixels.

z-index       This attribute specifies a layer's stacking order relative to other layers. Position is specified with positive integers, with 1 indicating the bottommost layer.

Example

  <p>  Content comes before.  </p>   <ilayer name="background" bgcolor="green">   <p>  Layered information goes here.  </p>   </ilayer>   <p>  Content comes after.  </p>  

Compatibility

No standards

Netscape 4, 4.5-4.8

Notes

  • Page developers are strongly encouraged not to use this element. Netscape dropped this element for browser versions 6.0 and higher. Its inclusion in this book is for support of existing documents only.

<img> (Image)

This element indicates a media object to be included in an HTML document. Usually, the object is a graphic image, but some implementations support movies and animations.

Standard Syntax

 <img      align="bottom  left  middle  right  top" (transitional only)      alt="alternative text"      border="pixels" (transitional only)      class="class name(s)"      dir="ltr  rtl"      height="pixels"      hspace="pixels" (transitional only)      id="unique alphanumeric identifier"      ismap="ismap"      lang="language code"      longdesc="url of description file"      name="unique alphanumeric identifier"      src="url of image"      style="style information"      title="advisory text"      usemap="url of map file"      vspace="pixels" (transitional only)      width="pixels" /> 

Attributes Defined by Internet Explorer

 accesskey="key" (5.5)      align="absbottom  absmiddle  baseline  texttop" (4)      datafld="name of column supplying bound data" (4)      datasrc="id of data source object supplying data" (4)      dynsrc="url of movie" (4)      galleryimg="yes  no  true  false" (6)      hidefocus="true  false" (5.5)      language="javascript  jscript  vbs  vbscript" (4)      loop="infinite  number" (4)      lowsrc="url of low-resolution image" (4)      tabindex="number" (5.5)      unselectable="on  off" (5.5) 

Standard Events

 onclick, ondblclick, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove,  onmouseout, onmouseover, onmouseup 

Events Defined by Internet Explorer

 onabort, onactivate, onafterupdate, onbeforeactivate, onbeforecopy, onbeforecut,  onbeforedeactivate, onbeforeeditfocus, onbeforepaste, onblur, oncontextmenu,  oncontrolselect, oncopy, oncut, ondeactivate, ondrag, ondragend, ondragenter,  ondragleave, ondragover, ondragstart, ondrop, onerrorupdate, onfilterchange,  onfocus, onfocusin, onfocusout, onhelp, onload, onlosecapture, onmouseenter,  onmouseleave, onmousewheel, onmove, onmoveend, onmovestart, onpaste,  onpropertychange, onreadystatechange, onresize, onresizeend, onresizestart,  onselectstart, ontimeerror 

Element-Specific Attributes

align       This attribute controls the horizontal alignment of the image with respect to the page. The default value is left . Netscape and Internet Explorer implementations support the absbottom , absmiddle , baseline , and texttop values. This attribute is deprecated under strict variants of HTML and XHTML.

alt       This attribute contains a string to be displayed instead of the image for browsers that cannot display images.

border       This attribute indicates the width, in pixels, of the border surrounding the image.

datafld       This attribute specifies the column name from the data source object that supplies the bound data. In this situation, the bound data is used to set the src of an <img> tag.

datasrc       This attribute indicates the id of the data source object that supplies the data that is bound to this <img> tag.

dynsrc       In the Microsoft implementation, this attribute indicates the URL of a movie file and is used instead of the src attribute.

galleryimg       This Microsoft attribute is used to control whether the gallery image menu should appear when the mouse pointer hovers over an image. The default value is true or yes . A value of no or false suppresses the menu. A meta tag like <meta http-equiv="imagetoolbar" content="no" /> can be used to suppress the image toolbar document wide.

height       This attribute indicates the height, in pixels or percentage of the screen, of the image.

hspace       This attribute indicates the horizontal space, in pixels, between the image and surrounding text.

ismap       This attribute indicates that the image is a server-side image map. User mouse actions over the image are sent to the server for processing.

longdesc       This attribute specifies the URL of a document that contains a long description of the image. This attribute is used as a complement to the alt attribute.

loop       In the Microsoft implementation, this attribute is used with the dynsrc attribute to cause a movie to loop. Its value is either a numeric loop count or the keyword infinite . Later versions of Internet Explorer suggest using -1 to suggest infinite.

lowsrc       This nonstandard attribute supported in most browsers contains the URL of an image to be initially loaded. Typically, the lowsrc image is a low-resolution or black-and-white image that provides a quick preview of the image to follow. Once the primary image is loaded, it replaces the lowsrc image.

name       This common attribute is used to bind a name to the image. Older browsers understand the name field, and in conjunction with scripting languages, it is possible to manipulate images by their defined names to create effects such as "rollover" buttons . While under future versions of HTML and XHTML the id attribute specifies element identifiers, name can still be used for backward compatibility.

src       This attribute indicates the URL of an image file to be displayed.

usemap       This attribute makes the image support client-side image mapping. Its argument is a URL specifying the map file, which associates image regions with hyperlinks.

vspace       This attribute indicates the vertical space in pixels between the image and surrounding text.

width       This attribute indicates the width in pixels of the image.

Examples

  <img src="mikka.jpg" lowsrc="mikkabw.jpg" alt="Grand Prix Driver"   height="320" width="150" />   <img src="hugeimagemap.gif" usemap="#mainmap" border="0" height="200"   width="200" alt="Image Map Here" />   <a href="home.htm"><img src=  "  homebutton  .  gif" width  ="50"  height="20"   alt="Link to Home Page" /></a>  

Compatibility

HTML 2, 3.2, 4, 4.01
XHTML 1.0, 1.1, Basic

Internet Explorer 2, 3, 4, 5, 5.5, 6
Netscape 1, 1.1, 2, 3, 4, 4.5-4.8, 6, 7
Opera 4-7

Notes

  • Typically, when you use the usemap attribute, the URL is a fragment, such as #map1, rather than a full URL. Some browsers do not support external client-side map files.

  • Under the strict HTML and XHTML definitions, the <img> tag does not support align , border , height , hspace , vspace , and width . The functionality of these attributes should be possible using style sheet rules.

  • Whereas the HTML 4 specification reserves data-binding attributes such as datafld or datasrc , it is not specified for <img> , although Internet Explorer provides support for these attributes.

  • XHTML 1.0 requires a trailing slash for this element: <img /> .

  • Under future versions of XHTML such as 2, <img> may be dropped in favor of <object> .

<input> (Input Form Control)

This element specifies an input control for a form. The type of input is set by the type attribute and can be a variety of different types, including single-line text field, password field, hidden, check box, radio button, or push button.

Standard Syntax

 <input      accept="MIME types"      accesskey="character"      align="bottom  left  middle  right  top" (transitional only)      alt="text"      checked="checked"      class="class name(s)"      dir="ltr  rtl"      disabled="disabled"       id="unique alphanumeric identifier"      lang="language code"      maxlength="maximum field size"      name="field name"      readonly="readonly"       size="field size"      src="url of image file"      style="style information"      tabindex="number"      title="advisory text"      type="button  checkbox  file  hidden  image              password  radio  reset  submit  text"      usemap="url of map file"      value="field value" /> 

Standard Event Attributes

 onchange, onclick, ondblclick, onkeydown, onkeypress, onkeyup, onmousedown,  onmousemove, onmouseout, onmouseover, onmouseup, onselect 

Attributes Defined by Internet Explorer

 autocomplete="off  on" (5) (password, text types only)      dynsrc="url of movie" (3) (image type only)      language="javascript  jscript  vbs  vbscript" (4)      disabled="false  true" (4) (all types except for hidden)      hidefocus="true  false" (5.5)      hspace="pixels or percentage" (3)      loop="number" (4) (image type only)      lowsrc="url of low-resolution image" (4) (image type only)      unselectable="off  on" (5.5)      vspace="pixels or percentage" (3) (image type only) 

Events Defined by Internet Explorer

 onactivate, onafterupdate (checkbox, hidden, password, radio, text),  onbeforeactivate (all types except for hidden), onbeforecut (all types except for  hidden), onbeforedeactivate, onbeforeeditfocus, onbeforepaste (all types except for  hidden), onbeforeupdate (checkbox, hidden, password, radio, text), onblur (all  types except  for hidden), oncontextmenu (all types except for hidden), oncontrolselect, oncut  (all types except for hidden), ondeactivate, ondrag (all types except for hidden),  ondragend (all types except for hidden), ondragenter (all types except for hidden),  ondragleave (all types except for hidden), ondragover (all types except for  hidden), ondragstart (all types except for hidden), ondrop (all types except for  hidden), onerrorupdate (checkbox, hidden, password, radio, text), onfilterchange  (all types except for hidden), onfocus, onfocusin (all types except for hidden),  onfocusout  (all types except for hidden), onhelp (all types except for hidden), onlosecapture,  onmouseenter (all types except for hidden), onmouseleave (all types except for  hidden), onmousewheel (all types except for hidden), onmove, onmoveend,  onmovestart, onpaste (all types except for hidden), onpropertychange,  onreadystatechange, onresize (button, file, image, password, reset, submit, text),  onresizeend, onresizestart, onselectstart (all types except for hidden),  ontimeerror 

Element-Specific Attributes

accept       This attribute is used to list the MIME types accepted for file uploads when using a file upload control ( <input type="file"> ).

accesskey       This attribute specifies a keyboard navigation accelerator for the element. Pressing ALT or a similar key in association with the specified character selects the form control correlated with that key sequence. Page designers are forewarned to avoid key sequences already bound to browsers.

align       With image form controls ( type="image" ), this attribute aligns the image with respect to surrounding text. The HTML 4.01 transitional specification defines bottom , left , middle , right , and top as allowable values. Netscape and Microsoft browsers might also allow the use of attribute values such as absbottom or absmiddle . Like other presentation-specific aspects of HTML, the align attribute is dropped under the strict HTML 4.01 specification.

alt       This attribute is used to display an alternative description of image buttons for text-only browsers. The meaning of alt for forms of <input> beyond type="image" is unclear.

autocomplete       This Microsoft-specific attribute is used to indicate whether the form field should be automatically filled in or not. The default value is no .

checked       The checked attribute should be used only for check box ( type="checkbox" ) and radio ( type="radio" ) form controls. The presence of this attribute indicates that the control should be displayed in its checked state.

disabled       This attribute is used to turn off a form control. Elements will not be submitted, nor will they receive any focus from the keyboard or mouse. Disabled form controls will not be part of the tabbing order. The browser also might gray out the form that is disabled, in order to indicate to the user that the form control is inactive. This attribute requires no value.

dynsrc       In the Microsoft implementation, this attribute indicates the URL of a movie file and is used instead of the src attribute for <input type="image"> .

loop       In the Microsoft implementation, this attribute is used with <input type="image"> and the dynsrc attribute to cause a movie to loop. Its value is either a numeric loop count or the keyword infinite . Later versions of Internet Explorer suggest using -1 to suggest infinite.

hspace       This Internet Explorer-specific attribute indicates the horizontal space in pixels between the image and surrounding text when using <input type="image"> .

lowsrc       This Microsoft-supported attribute contains the URL of an image to be initially loaded when using <input type="image"> . Typically, the lowsrc image is a low-resolution or black-and-white image that provides a quick preview of the image to follow. Once the primary image is loaded, it replaces the lowsrc image.

maxlength       This attribute indicates the maximum content length that can be entered in a text form control ( type="text" ). The maximum number of characters allowed differs from the visible dimension of the form control, which is set with the size attribute.

name       This attribute allows a form control to be assigned a name so that it can be referenced by a scripting language. Name is supported by older browsers, such as Netscape 2-generation browsers, but the W3C encourages the use of the id attribute. For compatibility purposes, both might have to be used.

readonly       This attribute prevents the form control's value from being changed. Form controls with this attribute set might receive focus from the user but might not be modified. Because it receives focus, a readonly form control will be part of the form's tabbing order. The control's value will be sent on form submission. This attribute can be used only with <input> when type is set to text or password . The attribute also is used with the textarea element.

size       This attribute indicates the visible dimension, in characters, of a text form control ( type="text" ). This differs from the maximum length of content, which can be entered in a form control set by the maxlength attribute.

src       This attribute is used with image form controls ( type="image" ) to specify the URL of the image file to load.

tabindex       This attribute takes a numeric value that indicates the position of the form control in the tabbing index for the form. Tabbing proceeds from the lowest positive tabindex value to the highest. Negative values for tabindex will leave the form control out of the tabbing order. When tabbing is not explicitly set, the browser tabs through items in the order they are encountered . Disabled form fields will not be part of the tabbing index, although read-only controls will be.

type       This attribute specifies the type of the form control. A value of button indicates a general-purpose button with no well-defined meaning. However, an action can be associated with the button by using an event handler attribute, such as onclick . A value of checkbox indicates a check box control. Check box form controls have a checked and unchecked setting, but even if these controls are grouped together, they allow a user to select multiple check boxes at once. In contrast, a value of radio indicates a radio button control. When grouped, radio buttons allow only one of the many choices to be selected at a given time.

A form control type of hidden indicates a field that is not visible to the viewer but is used to store information. A hidden form control often is used to preserve state information between pages.

A value of file for the type attribute indicates a control that allows the viewer to upload a file to a server. The filename can be entered in a displayed field, or a user agent might provide a special browse button allowing the user to locate the file. A value of image indicates a graphic image form control that a user can click on to invoke an associated action. (Most browsers allow the use of img -associated attributes such as height , width , hspace , vspace , and alt when the type value is set to image .) A value of password for the type attribute indicates a password entry field. A password field will not display text entered as it is typed; it might instead show a series of dots. Note that password-entered data is not transferred to the server in any secure fashion. A value of reset for the type attribute is used to insert a button that resets all controls within a form to their default values. A value of submit inserts a special submission button that, when clicked, sends the contents of the form to the location indicated by the action attribute of the enclosing <form> tag. Lastly, a value of text (the default) for the type attribute indicates a single-line text input field.

usemap       This HTML 4.0 attribute is used to indicate the map file to be associated with an image when the form control is set with type="image" . The value of the attribute should be a URL of a map file, but generally will be in the form of a URL fragment referencing a map file within the current file.

value       This attribute has two different uses, depending on the value for the type attribute. With data-entry controls ( type="text" and type = "password" ), this attribute is used to set the default value for the control. When used with check box or radio form controls, this attribute specifies the return value for the control. If not set for these fields, a default value of on will be submitted when the control is activated.

vspace       This Internet Explorer-specific attribute indicates the vertical space in pixels between the image and surrounding text when using <input type="image"> .

width       This attribute, supported by Internet Explorer, is used to set the size of the form control in pixels.

Examples

  <form action="#" method="get">  Enter your name:  <input type="text" maxlength="35" size="20" /><br />  Enter your password:  <input type="password" maxlength="35" size="20" />   <br /><br />  Which is your favorite food?  <input type="radio" name="favorite" value="Mexican" />  Mexican  <input type="radio" name="favorite" value="Russian" />  Russian  <input type="radio" name="favorite" value="Japanese" />  Japanese  <input type="radio" checked name="favorite" value="Other" />  Other  <br/><br />   <input type="submit" value="Submit" />   <input type="reset" value="Reset" />   </form>  

Compatibility

HTML 2, 3.2, 4, 4.01
XHTML 1.0, 1.1, Basic

Internet Explorer 2, 3, 4, 5, 5.5, 6
Netscape 1, 1.1, 2, 3, 4, 4.5-4.8, 6, 7
Opera 4-7

Notes

  • Some documents suggest the use of type="textarea" . Even if this strange form is supported, it should be avoided in favor of the <textarea> tag, which is common to all browsers.

  • The HTML 2.0 and 3.2 specifications support only the align , checked , maxlength , name , size , src , type , and value attributes for the input element.

  • The HTML 4.01 specification also reserves the use of the datafld , dataformatas , and datasrc data-binding attributes. They were not included in the XHTML specification but are supported by Internet Explorer.

  • Use of autocomplete may have security implications. Use with caution.

  • Under the strict HTML and XHTML specifications, the align attribute is not allowed.

  • As an empty element under XHTML, <input /> requires the trailing slash.

<ins> (Inserted Text)

This element is used to indicate that text has been added to the document.

Standard Syntax

 <ins      cite="URL"      class="class name(s)"      datetime="date"      dir="ltr  rtl"       id="unique alphanumeric identifier"      lang="language code"      style="style information"      title="advisory text">     </ins> 

Attributes Defined by Internet Explorer

 accesskey="key" (5.5)      contenteditable=" false  true  inherit " (5.5)      disabled="false  true" (5.5)      hidefocus="true  false" (5.5)      language="javascript  jscript  vbs  vbscript" (4)      tabindex="number"(5.5)      unselectable="on  off" (5.5) 

Standard Event Attributes

 onclick, ondblclick, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove,  onmouseout, onmouseover, onmouseup 

Events Defined by Internet Explorer

 onactivate, onbeforedeactivate, onbeforeeditfocus, onblur, oncontrolselect,  ondeactivate, onfocus, onmove, onmoveend, onmovestart, onreadystatechange,  onresizeend, onresizestart, ontimeerror 

Element-Specific Attributes

cite       The value of this attribute is a URL that designates a source document or message for the information inserted. This attribute is intended to point to information explaining why the text was changed.

datetime       This attribute is used to indicate the date and time the insertion was made. The value of the attribute is a date in a special format as defined by ISO 8601. The basic date format is

 yyyy-mm-ddthh:mm:ssTZD   where the following is true:   yyyy=four-digit year such as 1999   mm=two-digit month (01=January, 02=February, and so on)   dd=two-digit day of the month (01 through 31)   hh=two-digit hour (00 to 23) (24-hour clock not AM or PM)   mm=two-digit minute (00 to 59)   ss=two-digit second (00 to 59)   tzd=time zone designator 

The time zone designator is either z , which indicates Universal Time Coordinate, or coordinated universal time format (UTC), or + hh : mm , which indicates that the time is a local time that is hh hours and mm minutes ahead of UTC. Alternatively, the format for the time zone designator could be - hh : mm , which indicates that the local time is behind UTC. Note that the letter "T" actually appears in the string, all digits must be used, and 00 values for minutes and seconds might be required. An example value for the datetime attribute might be 1999-10-6T09:15:00-05:00 , which corresponds to October 6, 1999, 9:15 A.M., U.S. Eastern Standard Time.

Example

  <ins cite="http://www.bigcompany.com/changes/oct99.html"   date="1999-10-06T09:15:00-05:00">  The penalty clause applies to client lateness as well.  </ins>  

Compatibility

HTML 4, 4.01
XHTML 1.0, 1.1

Internet Explorer 4, 5, 5.5, 6
Netscape 6, 7
Opera 4-7

Notes

  • Browsers can render inserted ( <ins> ) or deleted ( <del> ) text in a different style to show the changes that have been made to the document. Eventually, a browser could have a way to show a revision history on a document. User agents that do not understand <del> or <ins> will show the information anyway, so there is no harm in adding information, only in deleting it.

<isindex> (Index Prompt)

This element indicates that a document has an associated searchable keyword index. When
a browser encounters this element, it inserts a query entry field at that point in the document. The viewer can enter query terms to perform a search. This element is deprecated under the
strict HTML and XHTML specifications and should not be used.

Standard Syntax (Transitional Only)

 <isindex       class="class name(s)"       dir="ltr  rtl"       href="url" (nonstandard but common)       id="unique alphanumeric identifier"       lang="language code"       prompt="string"       style="style information"       title="advisory text" /> 

Attributes Defined by Internet Explorer

 accesskey="key" (5.5)      action="URL to send query" (3)      contenteditable=" false  true  inherit" (5.5)      disabled="false  true" (5.5)      hidefocus="true  false" (5.5)      language="javascript  jscript  vbs  vbscript" (4)      tabindex="number" (5.5)      unselectable="on off" (5.5) 

Events Defined by Internet Explorer

 onactivate, onbeforedeactivate, onbeforeeditfocus, onblur, oncontrolselect,  ondeactivate, onfocus, onmove, onmoveend, onmovestart, onreadystatechange,  onresize, onresizeend, onresizestart 

Element-Specific Attributes

action       This attribute specifies the URL of the query action to be executed when the viewer presses the ENTER key. Although this attribute is not defined under any HTML specification, it is common to many browsers, particularly Internet Explorer 3, which defined it.

prompt       This attribute allows a custom query prompt to be defined. The default prompt is "This is a searchable index. Enter search keywords."

Examples

  <isindex action="cgi-bin/search" prompt="Enter search terms" />  <!-- very old HTML style syntax below -->  <base href="cgi-bin/search">   <isindex prompt="Enter search terms" />   <isindex href="cgi-bin/search" prompt="Keywords:" />  

Compatibility

HTML 2, 3.2, 4, 4.01 (transitional)
XHTML 1.0 (transitional)

Internet Explorer 2, 3, 4, 5, 5.5, 6
Netscape 1.1, 2, 3, 4, 4.5-4.8, 6, 7
Opera 4-7

Notes

  • Originally, the W3C intended this element to be used in a document's head . Browser vendors have relaxed this usage to allow the element in a document's body . Early implementations did not support the action attribute and used a <base> tag or an href attribute to specify a search function's URL.

  • As an empty element, <isindex> requires no closing tag under HTML specifications. However, under the XHTML specification, a trailing slash <isindex /> is required.

  • The HTML 3.2 specification only allows the prompt attribute, whereas HTML 2 expected a text description to accompany the search field.

  • Netscape 1.1 originated the use of the prompt attribute.

<kbd> (Keyboard Input)

This element logically indicates text as keyboard input. A browser generally renders text enclosed by this element in a monospaced font.

Standard Syntax

 <kbd      class="class name(s)"      dir="ltr  rtl"      id="unique alphanumeric identifier"      lang="language code"      style="style information"      title="advisory text">     </kbd> 

Attributes Defined by Internet Explorer

 accesskey="key" (5.5)      contenteditable=" false  true  inherit" (5.5)      disabled="false  true" (5.5)      hidefocus="true  false" (5.5)      language="javascript  jscript  vbs  vbscript" (4)      tabindex="number" (5.5)      unselectable="on  off" (5.5) 

Standard Event Attributes

 onclick, ondblclick, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove,  onmouseout, onmouseover, onmouseup 

Events Defined by Internet Explorer

 onactivate, onbeforeactivate, onbeforecut, onbeforedeactivate, onbeforeeditfocus,  onbeforepaste, onblur, oncontextmenu, oncontrolselect, oncut, ondeactivate, ondrag,  ondragend, ondragenter, ondragleave, ondragover, ondragstart, ondrop, onfocus,  onfocusin, onfocusout, onhelp, onlosecapture, onmouseenter, onmouseleave,  onmouseup, onmousewheel, onmove, onmoveend, onmovestart, onpaste, onpropertychange,  onreadystatechange, onresize, onresizeend, onresizestart, onselectstart,  ontimeerror 

Example

 Enter the change directory command at the prompt as shown below:  <br /><br />   <kbd>  CD ..  </kbd>  

Compatibility

HTML 2, 3.2, 4, 4.01
XHTML 1.0, 1.1, Basic

Internet Explorer 2, 3, 4, 5, 5.5, 6
Netscape 1, 2, 3, 4-4.7, 6, 7
Opera 4-7

Notes

  • The HTML 2 and 3.2 specifications support no attributes for this element.



 <  Day Day Up  >  


HTML & XHTML
HTML & XHTML: The Complete Reference (Osborne Complete Reference Series)
ISBN: 007222942X
EAN: 2147483647
Year: 2003
Pages: 252
Authors: Thomas Powell

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net