HTML Ref
HTML Ref
Elements HTA:APPLICATION
Properties applicationName
border
borderStyle
caption
commandLine
icon
maximizeButton
minimizeButton
showInTaskBar
singleInstance
sysMenu
version
windowState
Attributes APPLICATION
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
!Doctype Element DHTML References
Web Workshop | DHTML, HTML & CSS
DHTML Objects
The following is a list of the objects defined by Dynamic HTML. The links
take you to the object definitions, which contain the set of members for the
object.
Input Types
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
DHTML Properties
Web Workshop | DHTML, HTML & CSS
Internet Explorer 5.5 Properties
The following DHTML properties from the latest release of
Microsoft® Internet Explorer 5.5 are fully documented in
the MSDN® Online Web Workshop.
Property Description
contentEditable Sets or retrieves a string that indicates whether the user can edit
the content of the object.
scrollbar3dLightColor Sets or retrieves the color of the top and left edges of the scroll
box and scroll arrows of a scroll bar.
scrollbarArrowColor Sets or retrieves the color of the arrow element in a scroll arrow.
scrollbarBaseColor Sets or retrieves the color for elements of a scroll bar. If no other
properties are set, this property sets the color for all elements of
the scroll bar. If a specific scrollbar element property is set, it
overrides the scrollbarBaseColor setting for that element.
scrollbarDarkShadowColor Sets or retrieves the color of the gutter of a scroll bar. This color
occurs immediately outside the scrollBarShadowColor and affects
the bottom and right edges of the scroll box and scroll arrows.
scrollbarFaceColor Sets or retrieves the color of the scroll box and scroll arrows of a
scroll bar.
scrollbarHighlightColor Sets or retrieves the color for highlight areas in a scroll bar. This
affects the arrow element in the scroll arrow, and the top and left
edges of the scroll box and scroll arrows. If the
scrollbarTrackColor property is not set, highlight areas in the
track are affected.
scrollbarShadowColor Sets or retrieves the color of the bottom and right edges of the
scroll box and scroll arrows of a scroll bar.
scrollbarTrackColor Sets or retrieves the color of the track element of a scroll bar.
writingMode Sets or retrieves the direction and flow of the content in the
object.
zoom Sets or retrieves the magnification scale of the object.
Did you find this topic useful? Suggestions for other topics?
Write us!
For example, the color value #FF0000 is rendered red because the
red number is set to its highest value, FF (or 255 in decimal form).
indigo ivory
(#FFFFF0)
khaki
(#F0E68C)
lavender
(#E6E6FA)
(#4B0082)
lavenderblush lawngreen lemonchiffon lightblue
(#FFF0F5) (#7CFC00) (#FFFACD) (#ADD8E6)
lightcoral lightcyan lightgoldenrodyellow lightgreen
(#F08080) (#E0FFFF) (#FAFAD2) (#90EE90)
lightgray lightpink lightsalmon lightseagreen
(#D3D3D3) (#FFB6C1) (#FFA07A) (#20B2AA)
lightskyblue lightslategray lightsteelblue lightyellow
(#87CEFA) (#778899) (#B0C4DE) (#FFFFE0)
lime limegreen linen magenta
(#00FF00) (#32CD32) (#FAF0E6) (#FF00FF)
maroon mediumaquamarine
(#66CDAA) mediumblue mediumorchid
(#BA55D3)
(#800000) (#0000CD)
mediumpurple mediumseagreen mediumslateblue mediumspringgreen
(#9370DB) (#3CB371) (#7B68EE) (#00FA9A)
mediumturquoise
(#48D1CC)
mediumvioletred
(#C71585) midnightblue mintcream
(#F5FFFA)
(#191970)
mistyrose
(#FFE4E1)
moccasin
(#FFE4B5)
navajowhite
(#FFDEAD) navy
(#000080)
oldlace olive olivedrab orange
(#FDF5E6) (#808000) (#6B8E23) (#FFA500)
orangered orchid palegoldenrod palegreen
(#FF4500) (#DA70D6) (#EEE8AA) (#98FB98)
paleturquoise palevioletred papayawhip peachpuff
(#AFEEEE) (#DB7093) (#FFEFD5) (#FFDAB9)
peru pink plum powderblue
(#CD853F) (#FFC0CB) (#DDA0DD) (#B0E0E6)
purple red
(#FF0000)
rosybrown
(#BC8F8F)
royalblue
(#4169E1)
(#800080)
saddlebrown salmon
(#FA8072)
sandybrown
(#F4A460)
seagreen
(#2E8B57)
(#8B4513)
seashell sienna silver skyblue
(#FFF5EE) (#A0522D) (#C0C0C0) (#87CEEB)
slateblue slategray snow springgreen
(#6A5ACD) (#708090) (#FFFAFA) (#00FF7F)
steelblue tan teal thistle
(#4682B4) (#D2B48C) (#008080) (#D8BFD8)
tomato turquoise violet wheat
(#FF6347) (#40E0D0) (#EE82EE) (#F5DEB3)
white whitesmoke yellow yellowgreen
(#FFFFFF) (#F5F5F5) (#FFFF00) (#9ACD32)
User-Defined System Colors
Microsoft® Windows® maintains a set of system colors for
painting various parts of the display. In addition to the colors
defined in the color table, as of Internet Explorer 4.0 these system
colors may also be specified as color values in Web pages.
Users can set system colors for future Windows sessions using the
Windows Control Panel. The following table illustrates the
correspondence of these color names with the colors defined in the
Control Panel.
Note The colors that do not correspond to any Control Panel colors
can only be set programmatically using Windows APIs and cannot
be defined by the user.
activeborder
activecaption appworkspace
background
buttonface buttonhighlight buttonshadow
buttontext
captiontext graytext
highlight highlighttext
threedshadow window
windowframe windowtext
Did you find this topic useful? Suggestions for other topics? write
us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
DHTML References
Web Workshop | DHTML, HTML & CSS
Command Identifiers
Command identifiers specify an action to take on the given
object. Use them with the following methods:
execCommand
queryCommandEnabled
queryCommandIndeterm
queryCommandState
queryCommandSupported
queryCommandValue
The following command identifiers are currently available:
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
DHTML References
Web Workshop | DHTML, HTML & CSS
Language Codes
The following table lists all the possible language codes
used to specify various system settings.
af Afrikaans sq Albanian
ar-sa Arabic (Saudi Arabia) ar-iq Arabic (Iraq)
ar-eg Arabic (Egypt) ar-ly Arabic (Libya)
ar-dz Arabic (Algeria) ar-ma Arabic (Morocco)
ar-tn Arabic (Tunisia) ar-om Arabic (Oman)
ar-ye Arabic (Yemen) ar-sy Arabic (Syria)
ar-jo Arabic (Jordan) ar-lb Arabic (Lebanon)
ar-kw Arabic (Kuwait) ar-ae Arabic (U.A.E.)
ar-bh Arabic (Bahrain) ar-qa Arabic (Qatar)
eu Basque bg Bulgarian
be Belarusian ca Catalan
zh-tw Chinese (Taiwan) zh-cn Chinese (PRC)
zh-hk Chinese (Hong Kong, S.A.R. China) zh-sg Chinese (Singapore)
hr Croatian cs Czech
da Danish nl Dutch (Standard)
nl-be Dutch (Belgium) en English
en-us English (United States) en-gb English (Great Britain)
en-au English (Australia) en-ca English (Canada)
en-nz English (New Zealand) en-ie English (Ireland)
en-za English (South Africa) en-jm English (Jamaica)
en English (Caribbean) en-bz English (Belize)
en-tt English (Trinidad) et Estonian
fo Faeroese fa Farsi
fi Finnish fr French (Standard)
fr-be French (Belgium) fr-ca French (Canada)
fr-ch French (Switzerland) fr-lu French (Luxembourg)
gd Gaelic (Scotland) gd-ie Gaelic (Ireland)
de German (Standard) de-ch German (Switzerland)
de-at German (Austria) de-lu German (Luxembourg)
de-li German (Liechtenstein) el Greek
he Hebrew hi Hindi
hu Hungarian is Icelandic
in Indonesian it Italian (Standard)
it-ch Italian (Switzerland) ja Japanese
ko Korean ko Korean (Johab)
lv Latvian lt Lithuanian
mk Macedonian (FYROM) ms Malaysian
mt Maltese no Norwegian (Bokmal)
no Norwegian (Nynorsk) pl Polish
pt-br Portuguese (Brazil) pt Portuguese (Portugal)
rm Rhaeto-Romanic ro Romanian
ro-mo Romanian (Moldavia) ru Russian
ru-mo Russian (Moldavia) sz Sami (Lappish)
sr Serbian (Cyrillic) sr Serbian (Latin)
sk Slovak sl Slovenian
sb Sorbian es Spanish (Spain – Traditional)
es-mx Spanish (Mexico) es Spanish (Spain – Modern)
es-gt Spanish (Guatemala) es-cr Spanish (Costa Rica)
es-pa Spanish (Panama) es-do Spanish (Dominican Republic)
es-ve Spanish (Venezuela) es-co Spanish (Colombia)
es-pe Spanish (Peru) es-ar Spanish (Argentina)
es-ec Spanish (Ecuador) es-cl Spanish (Chile)
es-uy Spanish (Uruguay) es-py Spanish (Paraguay)
es-bo Spanish (Bolivia) es-sv Spanish (El Salvador)
es-hn Spanish (Honduras) es-ni Spanish (Nicaragua)
es-pr Spanish (Puerto Rico) sx Sutu
sv Swedish sv-fi Swedish (Finland)
th Thai ts Tsonga
tn Tswana tr Turkish
uk Ukrainian ur Urdu
ve Venda vi Vietnamese
xh Xhosa ji Yiddish
zu Zulu
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Web Workshop | DHTML, HTML & CSS
DHTML, HTML & CSS
For navigation tips, please see using this site .
I
Looking for technical information on using DHTML, HTML,
CSS, and associated technologies? In this area of the MSDN
Online Web Workshop you'll find articles, white papers, and
lessons that will help guide you through the thickets of web
page design.
HTML
For information on HTML, the best starting place is our html
beginner's guide . Here you'll find information on tags,
I
elements, setting font sizes, and the mysteries of markup
code. Next, have a look at authoring basics , where you'll
I
find answers to "Seven Questions You Should Never Fear to
Ask" and other information resources for beginners.
Seasoned pros who want to finesse their code can turn to
authoring effective pages and designing efficient pages
I I
for advanced tips on layout, design, and form.
DHTML
If you're looking to enhance your pages with DHTML, you'll
find a general introduction in our dynamic html overview
I
and faqs articles. These articles will show you how to use
I
DHTML to bring movement and interactivity to your web
pages. Web page designers who want to hot-rod their pages
should turn to boosting performance and building high
I
performance html pages for pointers on how to make web
I
pages more immediate and responsive. MSDN's DHTML
Dude answers questions on such subjects as positioning,
mouseover support, and baffling modal dialogues in his
dhtml dude questions and answers .
I
CSS
Working with Cascading Style Sheets? The css overview
I
provides an introductory look at DHTML, CSS, CSS
positioning, and font embedding. For a more complete
analysis of CSS, try out user's guide to style sheets .
I
HTML Help
Developers who create content for software programs,
multimedia titles, intranets, extranets, or for the Internet
often need to write HTML Help programs to go with their
products. The introducing html help guide provides
I
samples, software, and a helpful user's guide.
Scriptlets:
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Welcome to Scriptlet Tech...
Web Workshop | Component
Development
Designing and Using Scriptlets
You can easily create scriptlets and add them to your
applications.
To See
Choose a method for creating a scriptlet from your Web page Designing a Scriptlet
Use your scriptlet as a control Adding Scriptlets to Your Application
React to events in your applications Defining Event Handlers
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Welcome to Scriptlet Tech...
Web Workshop | Component
Development
Scriptlet Container Object Reference
When you work with scriptlets in your application, you can
use the following properties and events of the scriptlet
container object:
Properties
event
readyState
scrollbar
url
Events
onclick
ondblclick
onkeydown
onkeypress
onkeyup
onmousedown
onmousemove
onmouseup
onreadystatechange
onscriptletevent
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Welcome to Scriptlet Tech...
Web Workshop | Component
Development
Scriptlet Model Extensions
When creating the scripts in the scriptlet, you can use the
following specific extensions to the Dynamic HTML Object
Model. All extensions are available in the DHTML
window.external object.
Properties
frozen
selectableContent
version
Methods
bubbleEvent
raiseEvent
setContextMenu
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
CSS Length Units DHTML References
Web Workshop | DHTML, HTML & CSS
CSS Attributes Reference
This section defines the supported cascading style sheets (CSS) attributes.
An asterisk (*) indicates the attribute is available as of Microsoft® Internet
Explorer 5 or later. If an attribute or property has been proposed to the
World Wide Web Consortium (W3C) but not yet made standard, it is marked
as "proposed."
ime-mode (proposed)*
layout-grid (proposed)
layout-grid-char (proposed)
layout-grid-char-spacing (proposed)
layout-grid-line (proposed)
layout-grid-mode (proposed)
layout-grid-type (proposed)
line-break (proposed)*
line-height
letter-spacing
ruby-align (proposed)*
ruby-overhang (proposed)*
ruby-position (proposed)*
text-align
text-decoration
text-justify (proposed)*
text-indent
text-transform
unicode-bidi
vertical-align
word-break (proposed)*
word-spacing (Macintosh only)
Color and background properties background
background-attachment
background-color
background-image
background-position
background-repeat
color
Layout properties border
border-bottom
border-bottom-color
border-bottom-style
border-bottom-width
border-collapse*
border-color
border-left
border-left-color
border-left-style
border-left-width
border-right
border-right-color
border-right-style
border-right-width
border-style
border-top
border-top-color
border-top-style
border-top-width
border-width
clear
float
margin
margin-bottom
margin-left
margin-right
margin-top
padding
padding-bottom
padding-left
padding-right
padding-top
table-layout*
Classification properties display
list-style
list-style-image
list-style-position
list-style-type
Positioning properties bottom
clip
height
left
overflow
overflow-x (proposed)
overflow-y (proposed)
position
right
top
visibility
width
z-index
Printing properties page-break-after
page-break-before
Filter properties filter (proposed)
Pseudo-classes and other properties active
cursor
hover
@import
!important
link
visited
Unsupported CSS attributes first-letter pseudo
first-line pseudo
white-space
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
CSS Attributes Reference DHTML References
Web Workshop | DHTML, HTML & CSS
CSS Length Units
This section defines the supported length units for CSS attributes. Unless otherwise
specified, the length units are supported as of Microsoft® Internet Explorer 3.0 or later.
An asterisk (*) indicates the length unit is available as of Internet Explorer 4.0 or later.
Measurements and positions in cascading style sheets (CSS) properties are indicated in
length units. Internet Explorer supports two types of length units: relative and absolute.
A relative length unit specifies a length in relation to another length property. Relative
length units scale better from one output device to another, such as from a monitor to a
printer.
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
The Web Workshop is only available from
the live MSDN Online Web site.
Members
Remarks
You can create an HTA by saving an HTML page with an .hta file extension. However, to
take advantage of the applications-oriented functionality discussed in this reference,
you must include the HTA:APPLICATION tag and position it within the paired HEAD
tag to take effect.
You can turn off the scroll bars for the application window by including SCROLL="no" in
the BODY tag.
Example
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
APPLICATION Attribute BORDER Attribute | bor
Web Workshop | DHTML, HTML & CSS
APPLICATIONNAME Attribute | applicationName Property
Retrieves the name of the HTML Application (HTA).
Syntax
Possible Values
Remarks
When set to true, the singleInstance property checks the applicationName value
before launching an instance of the application. For this check to be valid, the
applicationName property must have a unique value assigned to it. You can use the
applicationName property to identify a single application, regardless of the URL used
to access it.
Example
<HTML>
<HEAD>
<HTA:APPLICATION ID="oHTA"
APPLICATIONNAME="myApp"
>
<SCRIPT>
alert("applicationName = " + oHTA.applicationName);
</SCRIPT>
</HEAD>
<BODY SCROLL="no">
</BODY>
</HTML>
This feature requires Internet Explorer 5 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
HTA:APPLICATION
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
APPLICATIONNAME Attribute... BORDERSTYLE A
Web Workshop | DHTML, HTML & CSS
BORDER Attribute | border Property
Retrieves the type of window border for the HTML Application (HTA).
Syntax
Possible Values
Remarks
The border property affects the window border and is valid only for HTA windows that
contain a title bar or caption. Setting border to none eliminates the title bar, program
icon, and Minimize/Maximize buttons. This property can be used with the borderStyle
property, which controls the content border within the window.
Example
This example uses the border property to apply a thin border to the window.
<HTML>
<HEAD>
<TITLE>Hello, World!</TITLE>
<HTA:APPLICATION ID="oHTA"
APPLICATIONAME="myApp"
BORDER="thin"
>
<SCRIPT>
alert("border = " + oHTA.border);
</SCRIPT>
</HEAD>
<BODY SCROLL="no">
</BODY>
</HTML>
This feature requires Internet Explorer 5 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
HTA:APPLICATION
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
BORDER Attribute | border... CAPTION Attribute
Web Workshop | DHTML, HTML & CSS
BORDERSTYLE Attribute | borderStyle Property
Retrieves the style set for the content border within the HTML Application (HTA) window.
Syntax
Possible Values
Remarks
All HTAs have two adjacent borders: one for the content of a window, and one for the
application window. The borderStyle property sets the style for the content border,
while the border property controls the application window border.
Example
This example uses the borderStyle property to apply a normal border around the
content of a window.
Applies To
HTA:APPLICATION
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
BORDERSTYLE Attribute | b... commandLine Pr
Web Workshop | DHTML, HTML & CSS
CAPTION Attribute | caption Property
Retrieves whether the window is set to display a title bar, or caption, for the HTML
Application (HTA).
Syntax
Possible Values
Remarks
The application title appears only when the caption property is set to yes. Turning off
the caption also disables the program icon and the Minimize and Maximize buttons. In
this case, you must provide an alternate way for the user to quit the HTA, such as a
button that invokes the close method of the window object.
Example
<HTML>
<HEAD>
<HTA:APPLICATION ID="oHTA"
CAPTION="yes"
>
<SCRIPT>
alert ("caption = " + oHTA.caption);
</SCRIPT>
</HEAD>
<BODY SCROLL="no">
</BODY>
</HTML>
This feature requires Internet Explorer 5 or later. Click the icon below to install the
latest caption. Then reload this page to view the sample.
Applies To
HTA:APPLICATION
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
CAPTION Attribute | capti... ICON Attribute | ic
Web Workshop | DHTML, HTML & CSS
commandLine Property
Retrieves the argument used to launch the HTML Application (HTA).
Syntax
HTML N/A
Scripting [ sPath = ] oHTA.commandLine
Possible Values
sPath String that specifies the path and arguments used to launch the HTA.
Remarks
The commandLine property returns an empty string when the HTA is launched over
the http protocol .
I
Example
<HTML>
<HEAD>
<HTA:APPLICATION ID="oHTA"
APPLICATIONNAME="myApp"
>
<SCRIPT>
alert("commandLine = " + oHTA.commandLine);
</SCRIPT>
</HEAD>
<BODY SCROLL="no">
</BODY>
</HTML>
This feature requires Internet Explorer 5 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
HTA:APPLICATION
See Also
Syntax
Possible Values
The property is read-only with a default value of the system application icon.
Remarks
The icon attribute recognizes the standard 32x32 pixel Microsoft® Windows® format
for .ico image files.
Example
<HTML>
<HEAD>
<HTA:APPLICATION ID="oHTA"
APPLICATIONNAME="myApp"
ICON="graphics/face01.ico"
>
<SCRIPT>
alert ("icon = " + oHTA.icon);
</SCRIPT>
</HEAD>
<BODY SCROLL="no">
</BODY>
</HTML>
This feature requires Microsoft® Internet Explorer 5 or later. Click the icon below to
install the latest version. Then reload this page to view the sample.
Applies To
HTA:APPLICATION
See Also
Syntax
Possible Values
Remarks
The window must have a title bar, or caption, for the Minimize and Maximize buttons to
display.
Example
<HTML>
<HEAD>
<TITLE>Hello, World!</TITLE>
<HTA:APPLICATION ID="oHTA"
APPLICATIONNAME="myApp"
CAPTION="yes"
MAXIMIZEBUTTON="yes"
>
<SCRIPT>
alert("maximizeButton = " + oHTA.maximizeButton);
</SCRIPT>
</HEAD>
<BODY SCROLL="no">
</BODY>
</HTML>
This feature requires Microsoft® Internet Explorer 5 or later. Click the icon below to
install the latest version. Then reload this page to view the sample.
Applies To
HTA:APPLICATION
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
MAXIMIZEBUTTON Attribute ... SHOWINTASKBA
Web Workshop | DHTML, HTML & CSS
MINIMIZEBUTTON Attribute | minimizeButton Property
Retrieves whether a Minimize button is displayed in the title bar of the HTML Application
(HTA) window.
Syntax
Possible Values
Remarks
The window must have a title bar, or caption, for the Minimize and Maximize buttons to
display.
Example
<HTML>
<HEAD>
<TITLE>Hello, World!</TITLE>
<HTA:APPLICATION ID="oHTA"
APPLICATIONNAME="myApp"
CAPTION="yes"
MINIMIZEBUTTON="yes"
>
<SCRIPT>
alert ("minimizeButton = " + oHTA.minimizeButton);
</SCRIPT>
</HEAD>
<BODY SCROLL="no">
</BODY>
</HTML>
This feature requires Microsoft® Internet Explorer 5 or later. Click the icon below to
install the latest version. Then reload this page to view the sample.
Applies To
HTA:APPLICATION
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
MINIMIZEBUTTON Attribute ... SINGLEINSTANC
Web Workshop | DHTML, HTML & CSS
SHOWINTASKBAR Attribute | showInTaskBar Property
Retrieves whether the HTML Application (HTA) is displayed in the Microsoft® Windows®
taskbar.
Syntax
Possible Values
Remarks
The showInTaskBar property does not affect whether the application appears in the
list of applications displayed when the user presses ALT+TAB.
Example
<HTML>
<HEAD>
<HTA:APPLICATION ID="oHTA"
APPLICATIONNAME="myApp"
SHOWINTASKBAR="no"
>
<SCRIPT>
alert ("showInTaskBar = " + oHTA.showInTaskBar);
</SCRIPT>
</HEAD>
<BODY SCROLL="no">
</BODY>
</HTML>
This feature requires Microsoft® Internet Explorer 5 or later. Click the icon below to
install the latest version. Then reload this page to view the sample.
Applies To
HTA:APPLICATION
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
SHOWINTASKBAR Attribute |... SYSMENU Attrib
Web Workshop | DHTML, HTML & CSS
SINGLEINSTANCE Attribute | singleInstance Property
Retrieves whether only one instance of the specified HTML Application (HTA) can run at a
time.
Syntax
Possible Values
Remarks
When set to true, the singleInstance property checks the value of the
applicationName property before launching an instance of the application. For this
check to be valid, the applicationName property must have a unique value assigned
to it. You can use the applicationName property to identify a single application,
regardless of the URL used to access it.
Example
<HTML>
<HEAD>
<HTA:APPLICATION ID="oHTA"
APPLICATIONNAME="myApp"
SINGLEINSTANCE="yes"
>
<SCRIPT>
alert("singleInstance = " + oHTA.singleInstance);
</SCRIPT>
</HEAD>
<BODY SCROLL="no">
</BODY>
</HTML>
This feature requires Internet Explorer 5 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
HTA:APPLICATION
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
SINGLEINSTANCE Attribute ... VERSION Attribu
Web Workshop | DHTML, HTML & CSS
SYSMENU Attribute | sysMenu Property
Retrieves whether a system menu is displayed in the HTML Application (HTA).
Syntax
Possible Values
Remarks
The HTA system menu is denoted by the program icon on the far left corner of the title
bar. When clicked, the HTA system menu displays all the commands included in the
standard Microsoft® Windows® system menu, including restore, move, size, minimize,
maximize, and close.
Many of the properties that affect the user interface of the window are interdependent.
For example, setting sysMenu to no disables the program icon and the Minimize and
Maximize buttons. Similarly, setting the border property to none disables the program
icon, title bar, and Minimize and Maximize buttons.
Example
<HTML>
<HEAD>
<HTA:APPLICATION ID="oHTA"
APPLICATIONNAME="myApp"
SYSMENU="yes"
>
<SCRIPT>
alert("sysMenu = " + oHTA.sysMenu);
</SCRIPT>
</HEAD>
<BODY SCROLL="no">
</BODY>
</HTML>
This feature requires Internet Explorer 5 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
HTA:APPLICATION
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
SYSMENU Attribute | sysMe... WINDOWSTATE A
Web Workshop | DHTML, HTML & CSS
VERSION Attribute | version Property
Retrieves the version number of the HTML Application (HTA).
Syntax
Possible Values
Example
<HTML>
<HEAD>
<HTA:APPLICATION ID="oHTA"
VERSION="1.0"
>
<SCRIPT>
alert("version = " + oHTA.version);
</SCRIPT>
</HEAD>
<BODY SCROLL="no">
</BODY>
</HTML>
This feature requires Microsoft® Internet Explorer 5 or later. Click the icon below to
install the latest version. Then reload this page to view the sample.
Applies To
HTA:APPLICATION
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
VERSION Attribute | versi... HTML Applications
Web Workshop | DHTML, HTML & CSS
WINDOWSTATE Attribute | windowState Property
Sets or retrieves the initial size of the HTML Application (HTA) window.
Syntax
Possible Values
Example
<HTML>
<HEAD>
<HTA:APPLICATION ID="oHTA"
APPLICATIONNAME="myApp"
WINDOWSTATE="maximize"
>
<SCRIPT>
alert("windowState = " + oHTA.windowState);
</SCRIPT>
</HEAD>
<BODY SCROLL="no">
</BODY>
</HTML>
This feature requires Microsoft® Internet Explorer 5 or later. Click the icon below to
install the latest version. Then reload this page to view the sample.
Applies To
HTA:APPLICATION
See Also
Syntax
Possible Values
Remarks
You can use the APPLICATION attribute to control the content of your Web pages.
For example, you can use the attribute to create an HTA that has one FRAME that
accesses unsafe content, such as Internet URLs, and another FRAME that accesses
safe content. You can also use the attribute for cross-domain scripting between HTA-
enabled frames.
HTAs are designed to prevent each untrusted HTML FRAME and IFRAME from having
script access to the HTA that contains them. In the case of a non-HTA-enabled FRAME,
the highest level frame comprises the top window for each FRAME that it contains.
The window.top and window.self are the same for that FRAME. In addition, an unsafe
FRAME or IFRAME receives neither a referrer nor an opener URL from the parent
HTA. This means FRAME or IFRAME are not affected by the the parent window of the
containing HTA.
Applies To
FRAME, IFRAME
See Also
html applications overview , HTML Applications References
I
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
A Element | A Object DHTML Objects
Web Workshop | DHTML, HTML & CSS
!DOCTYPE Element
Specifies the HTML document type definition (DTD) to which the document
corresponds.
Remarks
Example
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
In dynamic htmlInt
Web Workshop | DHTML, HTML & CSS
DHTML References
The reference material accessed through the following links
will help you to create compelling Web pages.
Objects
Properties
Methods
Events
Collections
HTML References
Elements
Character Sets
CSS References
CSS Attributes
CSS Length Units
Additional References
Color Table
Command Identifiers
Default Behaviors Reference
Language Codes
Tips and Tricks
Visual Filters and Transitions Reference
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
!DOCTYPE Element ACRONYM Element | ACRON
Web Workshop | DHTML, HTML & CSS
A Element | A Object
Designates the start or destination of a hypertext link.
Remarks
The A (anchor) element requires the href or the name property to be specified.
Both text and images can be included within an anchor. An image that is an anchor has
a border whose color indicates whether the link has been visited.
This element is available in HTML and script as of Microsoft® Internet Explorer 3.0.
Members
Example
The following examples use the A element to link files, open a file, include an image as
part of a link, define an anchor, and invoke a function.
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
A Element | A Object ADDRESS Element | ADD
Web Workshop | DHTML, HTML & CSS
ACRONYM Element | ACRONYM Object
Indicates an acronym abbreviation.
Remarks
This element is available in HTML and script as of Microsoft® Internet Explorer 4.0.
Members
Example
<ACRONYM>MSN</ACRONYM>
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
ACRONYM Element | ACRONYM... APPLET Elem
Web Workshop | DHTML, HTML & CSS
ADDRESS Element | ADDRESS Object
Specifies information, such as address, signature, and authorship, of the current
document.
Remarks
Members
Example
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
ADDRESS Element | ADDRESS... AREA Element
Web Workshop | DHTML, HTML & CSS
APPLET Element | APPLET Object
Places executable content on the page.
Remarks
To use executable content specified by the APPLET element, a user's computer must
have the Microsoft virtual machine installed.
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
APPLET Element | APPLET O... Attribute Object
Web Workshop | DHTML, HTML & CSS
AREA Element | AREA Object
Defines the shape, coordinates, and associated URL of one hyperlink region within a client-
side image MAP.
Remarks
Any number of AREA elements can be contained within the same MAP element.
The format of the COORDS value depends on the value of the SHAPE attribute.
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
This example provides the code for an image map of the solar system. It creates links
from the image map to individual images of the planets using the AREA element with
the MAP element, COORDS value, and SHAPE attribute. The user clicks the sun or
any planet to link to an individual image. To return to the solar system image map, the
user clicks the Back button.
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
AREA Element | AREA Objec... B Element | B O
Web Workshop | DHTML, HTML & CSS
Attribute Object
Represents an attribute or property of an HTML element as an object.
Remarks
A valid attribute or property can be any Dynamic HTML (DHTML) property or event that
applies to the object, or an expando.
Members
Example
This example uses the Attribute object to create a list of attributes that are specified.
<SCRIPT>
function fnFind(){
for(var i=0;i<oList.attributes.length;i++){
if(oList.attributes[i].specified){
alert(oList.attributes[i].nodeName + " = "
+ oList.attributes[i].nodeValue);
}
}
}
</SCRIPT>
<UL onclick="fnFind()">
<LI ID = "oItem1" ACCESSKEY = "L">List Item 1
</UL>
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
Attribute Object BASE Element | BASE Objec...
Web Workshop | DHTML, HTML & CSS
B Element | B Object
Specifies that the text should be rendered in bold.
Remarks
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
See Also
STRONG
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
B Element | B Object BASEFONT Element | BAS
Web Workshop | DHTML, HTML & CSS
BASE Element | BASE Object
Specifies an explicit URL used to resolve links and references to external sources such as
images and style sheets.
Remarks
When used, the BASE element must appear within the HEAD of the document, before
any elements that refer to an external source.
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
This example sets the base URL of the document to a reference folder. Internet
Explorer uses the BASE element to resolve the link to
http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/href_2.asp.
<HEAD>
<BASE
HREF="http://msdn.microsoft.com/workshop/author/dhtml/reference"
>
</HEAD>
<BODY>
Click <A HREF="properties/href_2.asp">here< to learn about the
href property.
</BODY>
This example retrieves the base URL from the document if a valid BASE element is
specified in the document. Otherwise, the function returns null.
<SCRIPT>
function GetBase()
{
var oBaseColl = document.all.tags('BASE');
return ( (oBaseColl && oBaseColl.length) ? oBaseColl[0].href
:
null );
}
</SCRIPT>
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
BASE Element | BASE Objec... BDO Element | B
Web Workshop | DHTML, HTML & CSS
BASEFONT Element | BASEFONT Object
Sets a base font value to be used as the default font when rendering text.
Remarks
This element can be used only within the BODY element or the HEAD element.
BASEFONT should appear before any displayed text in the BODY of the document.
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
This example uses the BASEFONT element to set the base font size, and the FONT
element to temporarily override it.
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
BASEFONT Object | BASEFON... BGSOUND Obj
Web Workshop | DHTML, HTML & CSS
BDO Element | BDO Object
Allows authors to disable the bidirectional algorithm for selected fragments of text.
Remarks
The BDO element can be used to control the reading order of a block of text.
The bidirectional algorithm and the DIR attribute generally suffice for embedded
direction changes. However, incorrect presentations can occur when you expose
formatted text to the bidirectional algorithm. For example, a paragraph containing
English and Hebrew that is formatted for e-mail could be incorrectly inverted by the
bidirectional algorithm. Because the reading order of the Hebrew text was inverted
once for the e-mail, exposing it to the bidirectional algorithm would invert the words a
second time.
The BDO element turns off the algorithm and controls the reading order. The DIR
attribute is required when you use the BDO element.
Members
Example
See Also
direction
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
BDO Element | BDO Object BIG Element | BIG
Web Workshop | DHTML, HTML & CSS
BGSOUND Element | BGSOUND Object
Enables pages with background sounds or soundtracks to be created.
Remarks
The BGSOUND element can be used only within the HEAD element.
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
BGSOUND Element | BGSOUND... BLOCKQUOT
Web Workshop | DHTML, HTML & CSS
BIG Element | BIG Object
Specifies that the enclosed text should be displayed in a larger font than the current font.
Remarks
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
BIG Element | BIG Object BODY Element | bod
Web Workshop | DHTML, HTML & CSS
BLOCKQUOTE Element | BLOCKQUOTE Object
Sets apart a quotation in text.
Remarks
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
This example uses the BLOCKQUOTE element to set off a quotation that renders as
indented text.
<P>He said,
<BLOCKQUOTE>"Hi there!"</BLOCKQUOTE>
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
BLOCKQUOTE Element | BLOC... BR Element |
Web Workshop | DHTML, HTML & CSS
BODY Element | body Object
Specifies the beginning and end of the document body.
Remarks
You can access the BODY element from script through the document object.
The window object for the BODY element can host event handlers for the onblur,
onfocus, onload, or onunload events.
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
Applies To
document
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
BODY Element | body Objec... BUTTON Elemen
Web Workshop | DHTML, HTML & CSS
BR Element | BR Object
Inserts a line break.
Remarks
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
BR Element | BR Object CAPTION Element | CA
Web Workshop | DHTML, HTML & CSS
BUTTON Element | BUTTON Object
Specifies a container for rich HTML that is rendered as a button.
Remarks
When the BUTTON element is submitted in a form, Microsoft® Internet Explorer 5 and
later submits the VALUE attribute, if it exists. Otherwise, the innerText property is
submitted. In Internet Explorer 4.0, only the innerText value is submitted.
Members
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
BUTTON Element | BUTTON O... CENTER Eleme
Web Workshop | DHTML, HTML & CSS
CAPTION Element | CAPTION Object
Specifies a brief description for a TABLE.
Remarks
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
This example uses the CAPTION element to provide a brief description for a table.
<TABLE>
<CAPTION VALIGN=BOTTOM>
This caption will appear below the table.
</CAPTION>
<TBODY>
<TR>
<TD>
This text is inside the table.
</TD>
</TR>
</TBODY>
</TABLE>
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
CAPTION Element | CAPTION... CITE Element |
Web Workshop | DHTML, HTML & CSS
CENTER Element | CENTER Object
Centers subsequent text and images.
Remarks
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
CENTER Element | CENTER O... clientInformatio
Web Workshop | DHTML, HTML & CSS
CITE Element | CITE Object
Indicates a citation by rendering text in italic.
Remarks
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
<CITE>Book Title.</CITE>
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
CITE Element | CITE Objec... clipboardData Ob
Web Workshop | DHTML, HTML & CSS
clientInformation Object
Contains information about the Web browser.
Remarks
Members
Example
This example shows how to determine whether the userAgent of the browser contains
"MSIE". If it does, the browser is Internet Explorer.
<SCRIPT LANGUAGE="JScript">
if (window.clientInformation.userAgent.indexOf( "MSIE " ) > 0)
// The browser is Microsoft Internet Explorer.
</SCRIPT>
This example shows how to determine whether the browser can run Java applets.
<SCRIPT LANGUAGE="JScript">
if (window.clientInformation.javaEnabled() == true )
// Java is enabled; applets can run.
</SCRIPT>
Applies To
window
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
clientInformation Object CODE Element | CODE
Web Workshop | DHTML, HTML & CSS
clipboardData Object
Provides access to predefined clipboard formats for use in editing operations.
Remarks
The clipboardData object is reserved for editing actions performed through the Edit
menu, shortcut menu, and shortcut keys. It transfers information using the system
clipboard and retains it until data from the next editing operation supplants it. This
form of data transfer is particularly suited to multiple pastes of the same data.
Members
Example
This example uses the setData and getData methods with the clipboardData object
to perform a cut-and-paste operation through the shortcut menu.
Applies To
window
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
clipboardData Object COL Element | COL Objec
Web Workshop | DHTML, HTML & CSS
CODE Element | CODE Object
Specifies a code sample.
Remarks
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
This example uses the CODE element to display text in a font used to represent
computer code, such as values or variable names.
See Also
SAMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
CODE Element | CODE Objec... COLGROUP Elem
Web Workshop | DHTML, HTML & CSS
COL Element | COL Object
Specifies column-based defaults for the table properties.
Remarks
The COL element is a block element and does not require a closing tag.
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
This examples uses the COL element to specify characteristics for default columns in a
table.
<TABLE>
<COLGROUP><COL ALIGN=RIGHT><COL ALIGN=LEFT></COLGROUP>
<COLGROUP><COL ALIGN=CENTER></COLGROUP>
<TBODY>
<TR>
<TD>This is the first column in the group and it is right-
aligned.</TD>
<TD>This is the second column in the group and it is left-
aligned.</TD>
<TD>This column is in a new group and it is centered.</TD>
</TR>
</TABLE>
See Also
COLGROUP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
COL Element | COL Object COMMENT Element
Web Workshop | DHTML, HTML & CSS
COLGROUP Element | COLGROUP Object
Contains a group of columns.
Remarks
The COLGROUP element is a block element and requires a closing tag if the
COLGROUP has COL elements nested within it; otherwise it does not require a closing
tag.
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
<TABLE>
<COLGROUP ALIGN="RIGHT"></COLGROUP>
<COLGROUP SPAN="2" ALIGN="LEFT"></COLGROUP>
<TBODY>
<TR>
<TD>This column is in the first group and is right-aligned.</TD>
<TD>This column is in the second group and is left-aligned.</TD>
<TD>This column is in the second group and is left-aligned.</TD>
</TR>
</TABLE>
See Also
COL
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
COLGROUP Element | COLGRO... currentStyle O
Web Workshop | DHTML, HTML & CSS
COMMENT Element | COMMENT Object
Indicates a comment that is not displayed.
Remarks
The COMMENT element is treated as a no-scope element and does not expose any
children.
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
COMMENT Element | COMMENT... custom Elem
Web Workshop | DHTML, HTML & CSS
currentStyle Object
Represents the cascaded format and style of the object as specified by global style sheets,
inline styles, and HTML attributes.
Remarks
The currentStyle object returns the cascaded styles on an element, but the style
object returns only the styles that have been applied inline on an element through the
STYLE attribute. Thus, the style values retrieved through the currentStyle object
might differ from the style values retrieved through the style object. For example, if
the color property is set on a paragraph only through a linked or embedded style
sheet, and not inline, then object.currentStyle.color returns the color, whereas
object.style.color does not return a value. If, however, the author specifies <P
STYLE="color:'red'">, the currentStyle and style objects return the value red.
The currentStyle object reflects the order of style precedence in cascading style
sheets (CSS). The CSS order of precedence for the presentation of HTML is:
1. Inline styles
2. Style sheet rules
3. Attributes on HTML tags
4. Intrinsic definition of the HTML tag
Accordingly, the currentStyle object returns the fontWeight value normal on a bold
tag if normal is specified in a style sheet.
The currentStyle object returns values that reflect the applied style settings for the
page and might not reflect what is rendering at the time a value is retrieved. For
example, an object that has "color:red; display:none" returns currentStyle.color
as red even though the object is not rendered on the page. The currentStyle object,
then, is not affected by the rendering constraints. The third example in the Example
section demonstrates this behavior. Disabled style sheets also do not affect
currentStyle values.
The returned value is in the same units as those used to set the object. For example, if
the color of an object is set inline using STYLE="color:'green'", then
object.currentStyle.color returns green and not #00FF00 (the red-green-blue
hexadecimal equivalent to green). However, capitalization and redundant white space
that appear in the object values set by the author are lost when the currentStyle
object returns the object values.
The currentStyle object supports user-defined properties in style rules. See the
second example in the Example section.
The currentStyle object is asynchronous. This means a style cannot be set and then
immediately queried—instead, the old value is returned. Thus, for a script to obtain the
expected behavior of currentStyle with methods such as addImport, the script needs
to include a function that calls the method and a function that checks currentStyle.
For a script to check the current style while a page is loading, the script must wait until
the BODY element is loaded and the page has rendered, or the value of currentStyle
might not reflect what is being displayed.
Members
Example
This example uses the currentStyle object to set the text color to brown. If you click
a colored area and the background color is the same as the text color, the checkColor
function changes the background color, so the text can be read. Otherwise, the
function takes no action.
This example uses the currentStyle object to retrieve values of the user-defined
property created in the style rule. The alert returns the value myvalue.
This example shows that the TD object width returned by the currentStyle object is
its cascaded width value rather than the width rendered on the screen.
Applies To
A, ACRONYM, ADDRESS, APPLET, AREA, B, BASE, BASEFONT, BDO, BGSOUND, BIG, BLOCKQUOTE, BODY, BR, BUTTON, CAPTION, CENTER, CITE,
CODE, COL, COLGROUP, COMMENT, custom, DD, DEL, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, HEAD, Hn, HTML, I, IMG,
INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset,
INPUT type=submit, INPUT type=text, INS, ISINDEX, KBD, LABEL, LEGEND, LI, LINK, LISTING, MAP, MARQUEE, MENU, META, NEXTID, NOBR,
OBJECT, OL, OPTION, P, PLAINTEXT, PRE, Q, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, STYLE, SUB, SUP, TABLE, TBODY, TD, TEXTAREA,
TFOOT, TH, THEAD, TITLE, TR, TT, U, UL, VAR, WBR, XMP
See Also
STYLE
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
currentStyle Object dataTransfer Object DHTM
Web Workshop | DHTML, HTML & CSS
custom Element | custom Object
Represents a user-defined element.
Remarks
Microsoft® Internet Explorer's support for custom tags on an HTML page requires that
a namespace be defined for the tag. Otherwise, the custom tag is treated as an
unknown tag when the document is parsed. Although navigating to a page with an
unknown tag in Internet Explorer does not result in an error, unknown tags have the
disadvantage of not being able to contain other tags, nor can they have behaviors
applied to them.
When defining custom tags, you must enclose custom tag definitions within an @media
wrapper.
Custom tags become much more interesting when applied with a DHTML behavior.
dhtml behaviors (or behaviors) and styles are applied to elements on a page the
I
same way—using cascading style sheets (CSS) attributes. More specifically, the
proposed CSS behavior attribute allows a Web author to specify the location of the
behavior and apply that behavior to an element on a page.
Members
Example
This example uses the custom element to create custom RED, GREEN, and BLUE
elements. These elements change the color of the text to red, green, or blue,
depending on whether it is surrounded by RED, GREEN, or BLUE tags. In this example,
the RED, GREEN, and BLUE tags are defined within a namespace called CUSTOMTAG.
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
custom Element | custom O... DD Element | DD
Web Workshop | DHTML, HTML & CSS
dataTransfer Object
Provides access to predefined clipboard formats for use in drag-and-drop operations.
Remarks
The dataTransfer object is used in source and target events. Typically, the setData
method is used with source events to provide information about the data being
transferred. In contrast, the getData method is used with target events to stipulate
which data and data formats to retrieve.
Members
Example
This example uses the setData and getData methods of the dataTransfer object to
perform a drag-and-drop operation.
Applies To
event
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
dataTransfer Object DEL Element | DEL Object
Web Workshop | DHTML, HTML & CSS
DD Element | DD Object
Indicates the definition in a definition list. The definition is usually indented in the
definition list.
Remarks
The DD element is a block element and does not require a closing tag.
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
This example uses the DD element with the DL and DT elements to create a definition
list.
<DL>
<DT>Cat
<DD>A small domesticated mammal.
<DT>Lizard
<DD>A reptile generally found in dry areas.
</DL>
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
DD Element | DD Object DFN Element | DFN O
Web Workshop | DHTML, HTML & CSS
DEL Element | DEL Object
Indicates text that has been deleted from the document.
Remarks
This element is available in HTML and script as of Microsoft® Internet Explorer 4.0.
Members
Example
See Also
INS
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
DEL Element | DEL Object DIR Element | DIR O
Web Workshop | DHTML, HTML & CSS
DFN Element | DFN Object
Indicates the defining instance of a term.
Remarks
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
DFN Element | DFN Object DIV Element | DIV O
Web Workshop | DHTML, HTML & CSS
DIR Element | DIR Object
Denotes a directory list.
Remarks
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
<DIR>
<LI>Art
<LI>History
<LI>Literature
<LI>Sports
<LI>Entertainment
<LI>Science
</DIR>
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
DIR Element | DIR Object DL Element | DL Obj
Web Workshop | DHTML, HTML & CSS
DIV Element | DIV Object
Specifies a container that renders HTML.
Remarks
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
This example uses two DIV elements to align two sections of text differently.
<DIV>
This text represents a section.
</DIV>
<DIV ALIGN=CENTER>
This text represents another section, and its text is centered.
</DIV>
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
DIV Element | DIV Object document Object D
Web Workshop | DHTML, HTML & CSS
DL Element | DL Object
Denotes a definition list.
Remarks
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
This example uses the DL element with the DD and DT elements to create a definition
list.
<DL>
<DT>Cat
<DD>A small domesticated mammal.
<DT>Lizard
<DD>A reptile generally found in dry areas.
</DL>
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
DL Element | DL Object DT Element | DT Objec
Web Workshop | DHTML, HTML & CSS
document Object
Represents the HTML document in a given browser window.
Remarks
Use the document object to retrieve information about the document, to examine and
modify the HTML elements and text within the document, and to process events.
The document object is available at all times. Retrieve the object by applying the
document property to a window or an element object. When used by itself, the
document object represents the document in the current window.
Windows CE
In Microsoft® Windows® CE, the document object is not available through scripting
for a window opened using the open method.
Members
Example
This example uses the document object to check for a document title, and displays
the title (if not null) in a message box.
if (document.title!="")
alert("The title is " + document.title)
This example shows an event handler function that displays the current position of the
mouse, relative to the upper-left corner of the document, in the browser's status
window.
<HTML>
<HEAD><TITLE>Report mouse moves</TITLE>
<SCRIPT LANGUAGE="JScript">
function reportMove() {
window.status = "X=" + window.event.x + " Y=" +
window.event.y;
}
</SCRIPT>
<BODY onmousemove="reportMove()">
<H1>Welcome!</H1>
</BODY>
</HTML>
Applies To
custom, window
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
document Object EM Element | EM Object DH
Web Workshop | DHTML, HTML & CSS
DT Element | DT Object
Indicates a definition term within a definition list.
Remarks
The DT element is a block element and does not require a closing tag.
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
This example uses the DT element with the DD and DL elements to create a definition
list.
<DL>
<DT>Cat
<DD>A small domesticated mammal.
<DT>Lizard
<DD>A reptile generally found in dry areas.
</DL>
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
DT Element | DT Object EMBED Element | EMB
Web Workshop | DHTML, HTML & CSS
EM Element | EM Object
Emphasizes text, usually by rendering it in italic.
Remarks
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
EM Element | EM Object event Object DHTML
Web Workshop | DHTML, HTML & CSS
EMBED Element | EMBED Object
Allows documents of any type to be embedded.
Remarks
The EMBED element must appear inside the BODY element of the document.
Users need to have an application that can view the data installed on their computer.
The EMBED element is a block element and does not require a closing tag.
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
EMBED Element | EMBED Obj... external Object
Web Workshop | DHTML, HTML & CSS
event Object
Represents the state of an event, such as the element in which the event occurred, the
state of the keyboard keys, the location of the mouse, and the state of the mouse buttons.
Remarks
The event object is available only during an event—that is, you can use it in event
handlers but not in other code.
Although all event properties are available to all event objects, some properties might
not have meaningful values during some events. For example, the fromElement and
toElement properties are meaningful only when processing the onmouseover and
onmouseout events.
In Microsoft® Visual Basic® Scripting Edition (VBScript), you must access the event
object through the window object.
Members
Example
This example uses the event object to check whether the user clicked the mouse
within a link, and to prevent the link from being navigated if the SHIFT key is down.
<HTML>
<HEAD><TITLE>Cancels Links</TITLE>
<SCRIPT LANGUAGE="JScript">
function cancelLink() {
if (window.event.srcElement.tagName == "A" &&
window.event.shiftKey)
window.event.returnValue = false;
}
</SCRIPT>
<BODY onclick="cancelLink()">
This example displays the current mouse position in the browser's status window.
Applies To
window
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
event Object FIELDSET Element | FIELDS... D
Web Workshop | DHTML, HTML & CSS
external Object
Allows access to an additional object model provided by host applications of the Microsoft®
Internet Explorer browser components.
Remarks
In a hosting scenario, the object model is defined by the application hosting the
Internet Explorer components (refer to the hosting application for documentation). For
more information about how to implement extensions to the DHTML object model, see
extending the dynamic html object model .
I
This object is not supported in html applications .
I
This object is available in script as of Internet Explorer 4.0.
Members
Applies To
window
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
external Object FONT Element | FONT Objec...
Web Workshop | DHTML, HTML & CSS
FIELDSET Element | FIELDSET Object
Draws a box around the text and other elements that the field set contains.
Remarks
This element is useful for grouping elements in a form and for distinctively marking
text in a document.
The FIELDSET element has the same behavior as a window frame. Since window
frames do not have scroll bars, assigning the overflow property a value of scroll will
render it as if the value were hidden.
This element is available in HTML and script as of Microsoft® Internet Explorer 4.0.
Members
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
FIELDSET Element | FIELDS... FORM Element |
Web Workshop | DHTML, HTML & CSS
FONT Element | FONT Object
Specifies a new font, size, and color to be used for rendering the enclosed text.
Remarks
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
FONT Element | FONT Objec... FRAME Element
Web Workshop | DHTML, HTML & CSS
FORM Element | FORM Object
Specifies that the contained controls take part in a form.
Remarks
Forms enable client-side users to submit data to a server in a standardized format. The
creator of a form designs the form to collect the required data using a variety of
controls, such as INPUT or SELECT. Users viewing the form fill in the data and then
click the Submit button to send the data to the server. A script on the server then
processes the data.
Each control element's NAME attribute must be defined if the data is to be submitted
with the form. An element in a form can be referenced by the NAME property or the
ID property, or through the elements collection.
When the focus is on a control in a form and the user presses ESC, the value of the
control reverts to the last value. The form resets if the user presses ESC again. If the
focus is on the form but not on a particular control and the user presses ESC once, the
form resets.
If the form includes only one text box and the user presses ENTER, the onsubmit event
fires. If the form has a Submit button, the button has a dark border, which indicates
the user can press ENTER to submit the form.
This element is available in HTML and script as of Microsoft® Internet Explorer 3.0.
Members
Example
This example uses the FORM element to create a basic form containing a text entry
box for the user's name and a select control for choosing a favorite ice cream flavor.
When the user clicks the Submit button, the form sends the data to the URL listed in
the ACTION property. The value of the METHOD property determines how to send the
data to the server.
<HTML>
<FORM ACTION="http://example.microsoft.com/sample.asp"
METHOD="POST">
Enter your name: <INPUT NAME="FName"><BR>
Favorite Ice Cream Flavor:
<SELECT NAME="Flavor">
<OPTION VALUE="Chocolate">Chocolate
<OPTION VALUE="Strawberry">Strawberry
<OPTION VALUE="Vanilla" SELECTED>Vanilla
</SELECT>
<P><INPUT TYPE=SUBMIT>
</FORM>
</HTML>
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
FORM Element | FORM Objec... FRAMESET Elem
Web Workshop | DHTML, HTML & CSS
FRAME Element | FRAME Object
Specifies an individual frame within a FRAMESET element.
Remarks
If a user opens a web folder inside a frame and then clicks something in the Web
I
folder, the file or folder that the user clicks takes over the entire window. For example,
suppose that a page contains two frames, one frame pointing to
http://www.microsoft.com and the second frame pointing to a network drive. If the
user clicks a file or folder in the second frame, that frame takes control of the entire
window, including the first frame. For file types that the browser cannot host, such as
.txt files, a separate window in the appropriate host application is opened.
A Web folder is a part of the file system hierarchy, but it does not necessarily represent
anything in the file system. An example is Network Neighborhood.
The FRAME element is a block element and does not require a closing tag.
This element is available in HTML and script as of Microsoft® Internet Explorer 3.0.
Members
Example
This example uses the FRAME element to define properties of the frame, including the
location of the page loaded by the frame.
This example shows how to reference an object with ID=sID in FRAME2, from another
frame of the same frameset.
parent.frames.FRAME2.sID.innertext
See Also
FRAMESET
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
FRAME Element | FRAME Obj... HEAD Element
Web Workshop | DHTML, HTML & CSS
FRAMESET Element | FRAMESET Object
Specifies a frameset, which is used to organize multiple frames and nested framesets.
Remarks
If a user opens a Web folder inside a frame and then clicks something in the Web
folder, the file or folder that the user clicks takes over the entire window. For example,
suppose that a page contains two frames, one frame pointing to
http://www.microsoft.com and the second frame pointing to a network drive. If the
user clicks a file or folder in the second frame, that frame takes control of the entire
window, including the first frame. For file types that the browser cannot host, such as
.txt files, a separate window in the appropriate host application is opened.
A Web folder is a part of the file system hierarchy, but it does not necessarily represent
anything in the file system. An example is Network Neighborhood.
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
This example uses the FRAMESET element to define three columns of rectangular
frames on a page.
See Also
FRAME
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
FRAMESET Element | FRAMES... history Object
Web Workshop | DHTML, HTML & CSS
HEAD Element | HEAD Object
Provides an unordered collection of information about the document.
Remarks
The HEAD element provides information that does not affect the rendering of the
document but could be of use to the browser. The following tags are valid in this
element:
BASE
BASEFONT
BGSOUND
LINK
META
NEXTID
SCRIPT
STYLE
TITLE
The HEAD element requires a closing tag.
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
<HEAD>
<TITLE>A Simple Document</TITLE>
</HEAD>
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
HEAD Element | HEAD Objec... Hn Object DH
Web Workshop | DHTML, HTML & CSS
history Object
Contains information about the URLs visited by the client.
Remarks
For security reasons, the history object does not expose the actual URLs in the
browser history. It does allow navigation through the browser history by exposing the
back, forward, and go methods. A particular document in the browser history can be
identified as an index relative to the current page. For example, specifying -1 as a
parameter for the go method is the equivalent of clicking the Back button.
Members
Applies To
window
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
history Object HR Element | HR Object DHTM
Web Workshop | DHTML, HTML & CSS
Hn Element | Hn Object
Renders text in heading style.
Remarks
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
This example uses the H1 element to apply a level-1 heading style to the contained
text.
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
Hn Object HTML Element | HTML Objec... DHT
Web Workshop | DHTML, HTML & CSS
HR Element | HR Object
Draws a horizontal rule.
Remarks
The HR element is a block element and does not require a closing tag.
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
HR Object HTML Comment Element DHTML O
Web Workshop | DHTML, HTML & CSS
HTML Element | HTML Object
Identifies the document as containing HTML elements.
Remarks
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
This example uses the HTML element to identify the document as an HTML document.
<HTML>
<BODY>
<P>This is an HTML document.</P>
</BODY>
</HTML>
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
HTML Comment Element IFRAME Element | IFR
Web Workshop | DHTML, HTML & CSS
I Element | I Object
Specifies that the text should be rendered in italic, where available.
Remarks
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
I Element | I Object IMG Element | IMG Object
Web Workshop | DHTML, HTML & CSS
IFRAME Element | IFRAME Object
Creates inline floating frames.
Remarks
sColor =
document.frames("sFrameName").document.body.style.backgroundColo
r;
You can access the IFRAME object's properties, but not its contents, through the
object model of the page where the IFRAME object resides. For example, the syntax
for accessing the border style of the IFRAME object is:
sBorderValue = document.all.oFrame.style.border;
This element is available in HTML and script as of Microsoft® Internet Explorer 4.0.
Members
Example
This example uses the IFRAME element and an HTML fragment to create a frame
containing the page sample.htm.
This example returns a reference to the all collection of the document contained by the
IFRAME.
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
IFRAME Element | IFRAME O... INPUT Element
Web Workshop | DHTML, HTML & CSS
IMG Element | IMG Object
Embeds an image or a video clip in the document.
Remarks
This element does not fire the onfocus event when it receives the input focus, unless it
has been associated with a MAP element.
The IMG element is an inline element and does not require a closing tag.
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
This example uses the IMG element to embed a bitmap image (.bmp file) on a page.
<IMG SRC=mygraphic.bmp>
See Also
INPUT
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
IMG Element | IMG Object INPUT type=button
Web Workshop | DHTML, HTML & CSS
INPUT Element | INPUT Object
Creates a variety of form input controls.
Remarks
The TYPE attribute for the INPUT element is used to specify one of the following form
input controls:
The INPUT element controls are inline elements and do not require a closing tag.
Example
This example uses the INPUT element to create different types of input controls.
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
INPUT type=text Element |... INSINDEX Eleme
Web Workshop | DHTML, HTML & CSS
INS Element | INS Object
Specifies text that has been inserted into the document.
Remarks
The INS element is an inline element and does not require a closing tag.
This element is available in HTML and script as of Microsoft® Internet Explorer 4.0.
Members
Example
This example uses the INS element to specify text inserted into a document.
See Also
DEL
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
INS Element | INS Object KBD Element | KBD O
Web Workshop | DHTML, HTML & CSS
ISINDEX Element | ISINDEX Object
Causes the browser to display a dialog window that prompts the user for a single line of
input.
Remarks
In HTML 4, this element is deprecated, and INPUT recommended for use instead. The
tagName property for ISINDEX returns INPUT.
The ISINDEX element is an inline element and does not require a closing tag.
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
This example uses the ISINDEX element to replace the default prompt.
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
ISINDEX Element | ISINDEX... LABEL DHTML
Web Workshop | DHTML, HTML & CSS
KBD Element | KBD Object
Renders text in a fixed-width font.
Remarks
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
This example uses the KBD element to render text in a fixed-width font.
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
KBD Element | KBD Object LEGEND Element |
Web Workshop | DHTML, HTML & CSS
LABEL Element | LABEL Object
Specifies a label for another element on the page.
Remarks
To bind LABEL to another control, set the FOR attribute of the LABEL element equal
to the ID of the control. Binding LABEL to the NAME attribute of the control has no
effect. However, to submit a form, you must specify a NAME on the control to which
the LABEL element is being bound.
There are two ways to underline the designated access key. The rich text support in
the LABEL object makes it possible to wrap the U element around the character in the
label text specified by the accessKey property. If you prefer to use cascading style
sheets (CSS) to apply style formatting, enclose the designated character in a SPAN and
set the style to "text-decoration: underline".
If the user clicks the label, the onclick event goes to the label and then bubbles to the
control specified by the htmlFor property. Pressing the access key for the label is the
same as clicking the label.
The LABEL element is an inline element and requires a closing tag. Labels cannot be
nested.
This element is available in HTML and script as of Microsoft® Internet Explorer 4.0.
Members
Example
This example uses the LABEL object and the accessKey property to set focus on a
text box.
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
LABEL Element | LABEL Obj... LI Element | LI O
Web Workshop | DHTML, HTML & CSS
LEGEND Element | LEGEND Object
Inserts a caption into the box drawn by the FIELDSET object.
Remarks
This element is available in HTML and script as of Microsoft® Internet Explorer 4.0.
Members
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
LEGEND Element | LEGEND O... LINK Element
Web Workshop | DHTML, HTML & CSS
LI Element | LI Object
Denotes one item in a list.
Remarks
The TYPE attribute values disc, circle, and square apply to unordered lists; the
values 1, a, A, i, and I apply to ordered lists.
The LI element is an inline element and does not require a closing tag.
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
This example uses the LI element to create individual items in a directory list.
<DIR>
<LI>Art
<LI>History
<LI>Literature
<LI>Sports
<LI>Entertainment
<LI>Science
</DIR>
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
LI Element | LI Object LISTING Element | LIST
Web Workshop | DHTML, HTML & CSS
LINK Element | LINK Object
Enables the current document to establish links to external documents.
Remarks
The LINK element can be used only within the HEAD tag.
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
This example uses the LINK element to apply an external style sheet, called
styles.css, to the page.
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
LINK Element | LINK Objec... location Object
Web Workshop | DHTML, HTML & CSS
LISTING Element | LISTING Object
Renders text in a fixed-width font.
Remarks
This tag is no longer recommended. Use the PRE or SAMP tag instead.
Members
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
LISTING Element | LISTING... MAP Element | M
Web Workshop | DHTML, HTML & CSS
location Object
Contains information about the current URL.
Remarks
The href property contains the entire URL, while the other properties contain portions
of the URL. The default property for the location object is location.href. For
example, setting location='http://microsoft.com' is equivalent to setting
location.href='http://microsoft.com'.
The browser immediately navigates to the specified URL when any of the properties
listed below are set.
Members
Applies To
document, window
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
location Object MARQUEE Element | MARQUEE.
Web Workshop | DHTML, HTML & CSS
MAP Element | MAP Object
Contains coordinate data for client-side image maps.
Remarks
An image map is a graphic image, with predefined regions, that contains links to other
documents or anchors. For example, you could create an image of the solar system
containing links that the user can click to navigate to pages for the individual planets.
The MAP object is referenced with the USEMAP attribute in an IMG element, as
follows:
A MAP element contains a set of AREA elements defining the linking regions in the
image.
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
This example provides the full code for an image map of the solar system. It creates
links from the image map to individual images of the planets using the AREA element
with the MAP element, COORDS value, and SHAPE attribute. The user clicks the sun or
any planet to link to an individual image. To return to the solar system image map, the
user clicks the Back button.
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
MAP Element | MAP Object MENU Element | ME
Web Workshop | DHTML, HTML & CSS
MARQUEE Element | MARQUEE Object
Creates a scrolling text marquee.
Remarks
The default width of the MARQUEE element is equal to the width of its parent
element. When a MARQUEE is in a TD that does not specify a width, you should
explicitly set the width of MARQUEE. If neither the MARQUEE nor the TD has a width
specified, the marquee is collapsed to a 1-pixel width.
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
This example uses the MARQUEE element to scroll the marquee from left to right
across the screen, moving it 10 pixels every 200 milliseconds.
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
MARQUEE Element | MARQUEE... META Elemen
Web Workshop | DHTML, HTML & CSS
MENU Element | MENU Object
Creates an unordered list of items.
Remarks
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
This example uses the MENU element to create a menu with two items.
<MENU>
<LI>This is the first item in the menu.
<LI>And this is the second item in the menu.
</MENU>
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
.">
Remarks
The META element also embeds document information that some search engines use
to index and categorize documents on the World Wide Web.
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
META Element | META Objec... NEXTID Object
Web Workshop | DHTML, HTML & CSS
navigator Object
Contains information about the Web browser.
Remarks
Members
Applies To
window
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
navigator Object NOBR Element | NOBR Objec.
Web Workshop | DHTML, HTML & CSS
NEXTID Object
Creates unique identifiers that text editing software can read.
Remarks
This element is available in HTML and script as of Microsoft® Internet Explorer 4.0.
Members
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
NEXTID Object NOFRAMES Element | NOFRAM.
Web Workshop | DHTML, HTML & CSS
NOBR Element | NOBR Object
Renders text without line breaks.
Remarks
This element is available in HTML and script as of Microsoft® Internet Explorer 4.0.
Members
Example
This example uses the NOBR element to prevent text lines from breaking.
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
NOBR Element | NOBR Objec... NOSCRIPT Elem
Web Workshop | DHTML, HTML & CSS
NOFRAMES Element | NOFRAMES Object
Contains HTML for browsers that do not support FRAMESET elements.
Remarks
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
This example uses the NOFRAMES element to specify HTML that is rendered by
browsers incapable of displaying frames.
<FRAMESET>
<NOFRAMES>You need Internet Explorer version 3.0 or later to
view
frames!</NOFRAMES>
</FRAMESET>
See Also
FRAME
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
NOFRAMES Element | NOFRAM... OBJECT Elem
Web Workshop | DHTML, HTML & CSS
NOSCRIPT Element | NOSCRIPT Object
Specifies HTML to be displayed in browsers that do not support scripting.
Remarks
This element is available in HTML and script as of Microsoft® Internet Explorer 4.0.
Members
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
NOSCRIPT Element | NOSCRI... OL Element | O
Web Workshop | DHTML, HTML & CSS
OBJECT Element | OBJECT Object
Inserts an object into the HTML page.
Remarks
Possible return values (those generated by DHTML Object Model properties) on the
OBJECT element depend on the implementation of the OBJECT. For example, the
readyState property returns null or error if the OBJECT does not implement a
readyState property. DHTML Object Model properties available for an OBJECT depend
on the content of the OBJECT. For information about supported properties, see the
documentation for the individual object.
Events are sent directly to the OBJECT element. If the event is returned by the
embedded object, it bubbles accordingly. If the event is not returned, it does not
bubble.
Note You can use the object property for the OBJECT element to reconcile DHTML
Object Model members that are duplicated by the OBJECT element's implementation
and by DHTML. For instance, if the OBJECT implements an item method, and DHTML
implements an item method, use document.all.objectID.object.item() to access
the one defined for the OBJECT.
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
This example uses script to define event handlers on the OBJECT element.
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
OBJECT Element | OBJECT O... OPTION Elemen
Web Workshop | DHTML, HTML & CSS
OL Element | OL Object
Draws lines of text as a numbered list.
Remarks
The TYPE attribute sets the list type for all ensuing lists unless a different type value is
set.
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
<OL>
<LI>This is the first item in the list.
<LI>And this is the second item in the list.
</OL>
<OL START=3>
<LI>This is item number 3.
</OL>
<OL TYPE=A>
<LI>This is item A.
</OL>
See Also
LI
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
OL Element | OL Object P Element | P Object
Web Workshop | DHTML, HTML & CSS
OPTION Element | OPTION Object
Denotes one choice in a SELECT element.
Remarks
Although OPTION elements do not appear in the all collection, you can gain access to
these elements by applying the options collection to the SELECT element.
You can add OPTION elements only to a SELECT element located in the same window
where the OPTION elements are created.
Except for background-color and color, style settings applied through the style object
for the OPTION element are ignored. In addition, style settings applied directly to
individual options override those applied to the containing SELECT element as a
whole.
This element is available in HTML and script as of Microsoft® Internet Explorer 3.0.
Members
Example
This example uses the OPTION element to create individual items in a drop-down list
box.
This example uses the options collection to append the selected item of the list box in
a text area.
<SCRIPT LANGUAGE="JScript">
function fnChange(){
oData.value+=oCars.options[oCars.selectedIndex].text + "\n";
}
</SCRIPT>
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
OPTION Element | OPTION O... PARAM Elemen
Web Workshop | DHTML, HTML & CSS
P Element | P Object
Denotes a paragraph.
Remarks
The P element is a block element and does not require a closing tag.
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
<P>This is a paragraph.</P>
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
P Element | P Object PLAINTEXT Element | PLA
Web Workshop | DHTML, HTML & CSS
PARAM Element | PARAM Object
Sets the property value for a given object.
Remarks
The PARAM element is valid within the APPLET, EMBED, and OBJECT elements.
Members
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
PARAM Element | PARAM Obj... PRE Element |
Web Workshop | DHTML, HTML & CSS
PLAINTEXT Element | PLAINTEXT Object
Renders text in a fixed-width font without processing tags.
Remarks
Members
See Also
XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
PLAINTEXT Element | PLAIN... Q Element | Q O
Web Workshop | DHTML, HTML & CSS
PRE Element | PRE Object
Renders text in a fixed-width font.
Remarks
Text within the PRE element is formatted. Spaces and carriage returns are preserved.
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
This example uses the PRE element to format text so that it renders exactly as it's
typed.
<PRE>
This text is formatted
exactly
as
it
is
typed.
</PRE>
See Also
XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
PRE Element | PRE Object RT Element | RT Obj
Web Workshop | DHTML, HTML & CSS
Q Element | Q Object
Sets apart a quotation in text.
Remarks
This element is available in HTML and script as of Microsoft® Internet Explorer 4.0.
Members
Example
<P>He said,
<Q>"Hi there!"</Q>
See Also
BLOCKQUOTE
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
Q Element | Q Object RUBY Element | RUBY Ob
Web Workshop | DHTML, HTML & CSS
RT Element | RT Object
Designates the ruby text for the RUBY element.
Remarks
A ruby is an annotation or pronunciation guide for a string of text. The string of text
annotated with a ruby is referred to as the base.
The ruby text specified by the RT element is positioned above or inline with the
rubyPosition property. Browsers that do not support the RT element render the ruby
text inline with the base text.
The RT element is an inline element and does not require a closing tag.
Members
Example
<RUBY>
Base Text
<RT>Ruby Text
</RUBY>
This feature requires Internet Explorer 5 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
See Also
RUBY
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
RT Element | RT Object rule Object DHTML O
Web Workshop | DHTML, HTML & CSS
RUBY Element | RUBY Object
Designates an annotation or pronunciation guide to be placed above or inline with a string
of text.
Remarks
A ruby is an annotation or pronunciation guide for a string of text. The string of text
annotated with a ruby is referred to as the base.
The only valid object within the RUBY element is the RT element. Text not contained
within the ruby text object, RT, is assumed to be a part of the base.
Members
Example
This example uses the RUBY element to specify the first string of text as the base,
and the RT element to specify the second string of text as the ruby.
<RUBY>
Base Text
<RT>Ruby Text
</RUBY>
This feature requires Internet Explorer 5 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
See Also
RT
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
RUBY Element | RUBY Objec... runtimeStyle Ob
Web Workshop | DHTML, HTML & CSS
rule Object
Represents a style within a cascading style sheet (CSS) that consists of a selector and one
or more declarations.
Remarks
The rule object defines a set of CSS attributes applied to a set of HTML elements. For
example, a rule consisting of the selector H1 and the declaration font-family:Arial
defines all H1 elements to render in the Arial font.
Members
Example
This example uses a rule object consisting of the selector H1 to define a single rule
that changes the H1 heading(s) in a document to red.
<STYLE>
H1 { color: red }
</STYLE>
If the style sheet containing the preceding rule is the first style sheet in the document,
the following code returns the rule object associated with the rule.
oRule=document.styleSheets(0).rules(0)
See Also
rules
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
rule Object S Element | S Object DHTML Obje
Web Workshop | DHTML, HTML & CSS
runtimeStyle Object
Represents the cascaded format and style of the object that overrides the format and style
specified in global style sheets, inline styles, and HTML attributes.
Remarks
The runtimeStyle object sets and retrieves the format and style of an object, and
overrides existing formats and styles in the process. Other than having precedence
over the style object and not persisting, the runtimeStyle object is equivalent to the
style object.
Members
Example
This example sets a value on the runtimeStyle object to affect the currentStyle
object, but not the style object.
<SCRIPT>
function fnChangeValue(sValue){
if(oDIV.runtimeStyle.backgroundColor ==
oDIV.style.backgroundColor){
sValue="";
}
oDIV.runtimeStyle.backgroundColor = sValue;
alert(oDIV.style.backgroundColor +
"\n" + oDIV.currentStyle.backgroundColor +
"\n" + oDIV.runtimeStyle.backgroundColor);
}
</SCRIPT>
<DIV ID = "oDIV">
This is a demonstration DIV.
</DIV>
This feature requires Internet Explorer 5 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
A, ACRONYM, ADDRESS, APPLET, AREA, B, BASE, BASEFONT, BGSOUND, BIG, BLOCKQUOTE, BODY, BR, BUTTON, CAPTION, CENTER, CITE, CODE,
COL, COLGROUP, COMMENT, custom, DD, DEL, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, FRAME, FRAMESET, HEAD, Hn, HR,
HTML, I, IFRAME, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=hidden, INPUT type=image, INPUT
type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, INS, KBD, LABEL, LEGEND, LI, LINK, LISTING, MAP,
MARQUEE, MENU, META, NEXTID, NOBR, OBJECT, OL, OPTION, P, PLAINTEXT, PRE, Q, rule, S, SAMP, SCRIPT, SELECT, SMALL, SPAN, STRIKE,
STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TITLE, TR, TT, U, UL, VAR, XMP
See Also
currentStyle
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
runtimeStyle Object SAMP Element | SAMP Obj
Web Workshop | DHTML, HTML & CSS
S Element | S Object
Renders text in strike-through type.
Remarks
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
This example uses the S element to render the text with a line through it.
See Also
STRIKE
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
S Element | S Object screen Object DHTML O
Web Workshop | DHTML, HTML & CSS
SAMP Element | SAMP Object
Specifies a code sample.
Remarks
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
See Also
CODE
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
SAMP Element | SAMP Objec... SCRIPT Elemen
Web Workshop | DHTML, HTML & CSS
screen Object
Contains information about the client's screen and rendering capabilities.
Remarks
Members
Applies To
window
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
screen Object SELECT Element | SELECT O...
Web Workshop | DHTML, HTML & CSS
SCRIPT Element | SCRIPT Object
Specifies a script for the page that is interpreted by a script engine.
Remarks
Code within the SCRIPT block that is not contained within a function is executed
immediately as the page is loaded. To keep scripts from being displayed on down-level
browsers, nest the SCRIPT block within a COMMENT block.
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
SCRIPT Element | SCRIPT O... selection Object
Web Workshop | DHTML, HTML & CSS
SELECT Element | SELECT Object
Denotes a list box or drop-down list.
Remarks
This element is available in HTML and script as of Microsoft® Internet Explorer 3.0.
Members
Example
This example uses the SELECT element to create a drop-down list box.
This example uses the SELECT element to create a multi-select list box by setting the
SIZE and MULTIPLE attributes. To retrieve the selected options for a multi-select list
box, iterate through the options collection and check to see where SELECTED is set to
true.
This example adds a new option to the end of an existing SELECT list. The new Option
constructor can also be used in Microsoft® JScript® (compatible with ECMA 262
language specification).
<SCRIPT LANGUAGE="JScript">
var oOption = document.createElement("OPTION");
oOption.text="Apples";
oOption.value="5";
document.all.oMyList.add(oOption);
</SCRIPT>
See Also
OPTION
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
SELECT Element | SELECT O... SMALL Element
Web Workshop | DHTML, HTML & CSS
selection Object
Represents the active selection, which is a highlighted block of text, and/or other elements
in the document on which a user or a script can carry out some action.
Remarks
You typically use the selection object as input from the user to identify which portion
of the document to act on, or as output to the user to show the results of an action.
Users and scripts can create selections. Users create selections by dragging the mouse
over a portion of the document. Scripts create selections by calling the select method
on a text range or similar object. To retrieve the active selection, apply the selection
keyword to the document object. To carry out work on a selection, create a text range
object from the selection using the createRange method.
A document can have only one selection at a time. The selection has a type that
determines whether it is empty or contains a block of text and/or elements. Although
an empty selection contains nothing, you can use it to mark a position in the
document.
Members
Applies To
document
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
selection Object SPAN Element | SPAN Objec...
Web Workshop | DHTML, HTML & CSS
SMALL Element | SMALL Object
Specifies that the enclosed text should be displayed in a smaller font.
Remarks
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
This example uses the SMALL element to display text in a smaller font.
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
SMALL Element | SMALL Obj... STRIKE Element
Web Workshop | DHTML, HTML & CSS
SPAN Element | SPAN Object
Specifies an inline text container.
Remarks
This element is especially useful for applying cascading style sheets (CSS) styles.
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
This example uses the SPAN element to create an inline text container that changes
the color of a word to blue.
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
SPAN Element | SPAN Objec... STRONG Elemen
Web Workshop | DHTML, HTML & CSS
STRIKE Element | STRIKE Object
Renders text in strike-through type.
Remarks
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
STRIKE Element | STRIKE O... STYLE Element
Web Workshop | DHTML, HTML & CSS
STRONG Element | STRONG Object
Renders text in bold.
Remarks
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
This example uses the STRONG element to emphasize text in boldface type.
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
STYLE Element | STYLE Obj... styleSheet Objec
Web Workshop | DHTML, HTML & CSS
style Object
Represents the current settings of all possible inline styles for a given element.
Remarks
Inline styles are cascading style sheets (CSS) style assignments that you apply directly
to individual HTML elements using the STYLE= attribute. Use the style object to
examine these assignments and to make new assignments or change existing ones.
To retrieve the style object, apply the style keyword to an element object. To
retrieve the current setting for an inline style, apply the corresponding style property
to the style object.
The style object does not provide access to the style assignments in style sheets. To
obtain information about styles in style sheets, use the styleSheets collection to access
to the individual style sheets defined in the document.
The following properties are not available when the rule object accesses the style
object: posHeight, posWidth, posTop, posLeft, pixelHeight, pixelWidth, pixelTop, and
pixelLeft.
Members
Example
This example uses the style object to set the document body text font to Verdana.
document.body.style.fontFamily = "Verdana"
This example positions all absolutely positioned images in the given document at the
top of the document.
This example copies the inline style of the second element (div2) to the first (div1)
while preserving the styles of the second. The background color of div1 is overwritten
during the assignment.
<SCRIPT>
div1.style.cssText += (';' + div2.style.cssText);
</SCRIPT>
Applies To
A, ACRONYM, ADDRESS, APPLET, AREA, B, BASE, BASEFONT, BGSOUND, BIG, BLOCKQUOTE, BODY, BR, BUTTON, CAPTION, CENTER, CITE, CODE,
COL, COLGROUP, COMMENT, custom, DD, DEL, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, FRAME, FRAMESET, HEAD, Hn, HR,
HTML, I, IFRAME, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=hidden, INPUT type=image, INPUT
type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, INS, KBD, LABEL, LEGEND, LI, LINK, LISTING, MAP,
MARQUEE, MENU, META, NEXTID, NOBR, OBJECT, OL, OPTION, P, PLAINTEXT, PRE, Q, rule, S, SAMP, SCRIPT, SELECT, SMALL, SPAN, STRIKE,
STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TITLE, TR, TT, U, UL, VAR, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
STRONG Element | STRONG O... style Object
Web Workshop | DHTML, HTML & CSS
STYLE Element | style Object
Specifies a style sheet for the page.
Remarks
The STYLE element should appear in the HEAD section of an HTML document.
Microsoft® Internet Explorer 4.0 and later permit multiple style blocks.
Members
Example
This example encloses style declarations in the STYLE tag and changes one of those
settings using the style object.
<HEAD>
<STYLE>
BODY { background-color: white; color: black; }
H1 { font: 8pt Arial bold; }
P { font: 10pt Arial; text-indent: 0.5in; }
A { text-decoration: none; color: blue; }
</STYLE>
<SCRIPT>
oParagraph.style.fontSize = 14;
</SCRIPT>
</HEAD>
<BODY>
<P>Sample Paragraph Text</P>
</BODY>
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
style Object SUB Element | SUB Object DHTM
Web Workshop | DHTML, HTML & CSS
styleSheet Object
Represents a single style sheet in the document.
Remarks
You can use this object to retrieve style sheet information, such as the URL of the
source file for the style sheet and the element in the document that owns (defines) the
style sheet. You also can use it to modify style sheets.
You can retrieve a styleSheet object from the styleSheets collection or from the
imports collection. Each item in these collections is a style sheet. A styleSheet object
is available for a style sheet only if it is included in a document with a STYLE or LINK
element, or with an @import statement in a STYLE element.
Members
Example
This example uses the styleSheet object to change the cascading style sheets (CSS)
values of inline and imported styles.
<STYLE>
BODY {background-color: #CFCFCF;}
@import url("otherStyleSheet.css");
</STYLE>
<SCRIPT>
window.onload=fnInit;
function fnInit(){
// Access a rule in the styleSheet, change backgroundColor to
blue.
var oStyleSheet=document.styleSheets[0];
var oRule=oStyleSheet.rules[0];
oRule.backgroundColor="#0000FF";
// Add a rule for P elements to have yellow backgrounds.
oStyleSheet.addRule("P","background-color: #FFFF00;");
// Change and imported rule:
oStyleSheet.imports[0].color="#000000";
}
</SCRIPT>
Applies To
styleSheets
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
styleSheet Object SUP Element | SUP Object
Web Workshop | DHTML, HTML & CSS
SUB Element | SUB Object
Specifies that the enclosed text should be displayed in subscript, using a smaller font than
the current font.
Remarks
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
This example uses the SUB element to change some of the text to a subscript font.
(X<SUB>1</SUB>,Y<SUB>1</SUB>)
See Also
SUP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
SUB Element | SUB Object TABLE Element | TA
Web Workshop | DHTML, HTML & CSS
SUP Element | SUP Object
Specifies that the enclosed text should be displayed in superscript, using a smaller font
than the current font.
Remarks
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
This example uses the SUP element to change some of the text to a superscript font.
(X<SUP>2</SUP> + Y<SUP>2</SUP>)
See Also
SUB
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
SUP Element | SUP Object TBODY Element | TB
Web Workshop | DHTML, HTML & CSS
TABLE Element | TABLE Object
Specifies that the contained content is organized into a table with rows and columns.
Remarks
The following tags are valid within a table: CAPTION, COL, COLGROUP, TBODY, TD,
TFOOT, TH, THEAD, and TR.
The TABLE object model is read-only for databound tables. For example, script used
to remove a table row works correctly on an unbound table, but not on a databound
table. The properties of a table object are still available, but changes to the bound
data in a table must be made to the data source.
The properties of a table are distinct from the properties of cells contained within the
table. For example, the offsetLeft property of a multicolumn table is not the same as
the offsetLeft property of the left-most cell in the table. Refer to the appropriate
object when writing scripts involving table and/or cell objects.
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
This example uses the TABLE element with THEAD, TR, and TH to create a table with
three rows and two columns.
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
TABLE Element | TABLE Obj... TD Element | TD
Web Workshop | DHTML, HTML & CSS
TBODY Element | TBODY Object
Designates rows as the body of the table.
Remarks
TD
TH
TR
This element is exposed for all tables, even if the table does not explicitly define a
TBODY element.
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
This example uses the TBODY element with the TABLE, TD, THEAD, and TR objects to
create a table with the first row in the table head and the second row in the table
body.
<TABLE>
<THEAD>
<TR>
<TD>
This text is in the THEAD.
</TD>
</TR>
</THEAD>
<TBODY>
<TR>
<TD>
This text is in the TBODY.
</TD>
</TR>
</TBODY>
</TABLE>
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
TBODY Element | TBODY Obj... TEXTAREA Elem
Web Workshop | DHTML, HTML & CSS
TD Element | TD Object
Specifies a cell in a table.
Remarks
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
TD Element | TD Object TextNode Object DHT
Web Workshop | DHTML, HTML & CSS
TEXTAREA Element | TEXTAREA Object
Specifies a multiline text input control.
Remarks
This element is available in HTML and script as of Microsoft® Internet Explorer 3.0.
Members
Example
This example uses the TEXTAREA element to set the cascading style sheets (CSS)
overflow attribute to "hidden" to remove the scroll bars from the TEXTAREA.
See Also
INPUT
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
TEXTAREA Element | TEXTAR... TextRange Obje
Web Workshop | DHTML, HTML & CSS
TextNode Object
Represents a string of text as a node in the document hierarchy.
Remarks
Use the createTextNode method to create a TextNode object. Once you create the
TextNode, you can add to it using the appendChild, replaceNode, or insertBefore
methods.
Members
Example
This example uses the TextNode object to change the text of an LI object.
<SCRIPT>
function fnChangeText(){
var oTextNode = document.createTextNode("New List Item 1");
var oReplaceNode = oItem1.firstChild.replaceNode(oTextNode);
}
</SCRIPT>
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
TextNode Object TextRectangle Object DHTML
Web Workshop | DHTML, HTML & CSS
TextRange Object
Represents text in an HTML element.
Remarks
Use this object to retrieve and modify text in an element, to locate specific strings in
the text, and to carry out commands that affect the appearance of the text.
Modify the extent of the text range by moving its start and end positions with methods
such as move, moveToElementText, and findText. Within the text range, you can
retrieve and modify plain text or HTML text. These forms of text are identical except
that HTML text includes HTML tags, and plain text does not.
This feature might not be available on non-Win32® platforms. See article q172976
I
in the Microsoft® Knowledge Base for the latest information on Internet Explorer
cross-platform compatibility.
Members
Example
This example changes the text of a BUTTON element to "Clicked" through the
TextRange object.
<SCRIPT LANGUAGE="JScript">
var b = document.all.tags("BUTTON");
if (b!=null) {
var r = b[0].createTextRange();
if (r != null) {
r.text = "Clicked";
}
}
</SCRIPT>
See Also
createTextRange
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
TextRange Object TFOOT Element | TFOOT Obj
Web Workshop | DHTML, HTML & CSS
TextRectangle Object
Specifies a rectangle that contains a line of text in either an element or a TextRange
object.
Remarks
In the following excerpt from the Gettysburg Address, four TextRectangle objects are
contained in the B element (bold text).
1. "our fathers"
2. "brought forth . . . a new nation, conceived in liberty"
3. "and dedicated to the proposition that all men are"
4. "created equal"
If you resize the window containing this text, the TextRectangle objects do not
update. Since the objects are a snapshot of the layout, the objects should update
following after an onresize event occurs.
Members
Example
This example uses the TextRectangle collection with the getClientRects and
getBoundingClientRect methods to determine the position of the text rectangle
within an element. In each line, the left-justified text does not extend to the right
margin of the box that contains the text. Using this collection, you can determine the
coordinates of the rectangle that surrounds only the content in each line. The example
code reads these rectangle coordinates and instructs the ball to move over the text
only, and not to the end of the line.
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
TextRectangle Object TH Element | TH Object
Web Workshop | DHTML, HTML & CSS
TFOOT Element | TFOOT Object
Designates rows as the table's footer.
Remarks
TD
TH
TR
The TFOOT element is a block element and requires a closing tag.
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
This example uses the TFOOT element with the TABLE, TBODY, TD, and TR objects to
create a table with the first row in the table body and the second row in the table
footer.
<TABLE>
<TBODY>
<TR>
<TD>
This text is in the table body.
</TD>
</TR>
</TBODY>
<TFOOT>
<TR>
<TD>
This text is in the table footer.
</TD>
</TR>
</TFOOT>
</TABLE>
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
TFOOT Element | TFOOT Obj... THEAD Element
Web Workshop | DHTML, HTML & CSS
TH Element | TH Object
Specifies a header column. Header columns are centered within the cell and are bold.
Remarks
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
See Also
TD, TR
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
TH Element | TH Object TITLE Element | TITLE
Web Workshop | DHTML, HTML & CSS
THEAD Element | THEAD Object
Designates rows as the table's header.
Remarks
TD
TH
TR
The THEAD element is a block element and requires a closing tag.
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
This example uses the TFOOT element with the TABLE, TBODY, TD, and TR objects to
create a table with the first row in the table header and the second row in the table
body.
<TABLE>
<THEAD>
<TR>
<TD>
This text is in the table header.
</TD>
</TR>
</THEAD>
<TBODY>
<TR>
<TD>
This text is in the table body.
</TD>
</TR>
</TBODY>
</TABLE>
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
THEAD Element | THEAD Obj... TR Element | T
Web Workshop | DHTML, HTML & CSS
TITLE Element | title Object
Contains the title of the document.
Remarks
This element can be used only within the HEAD element. Any text between the opening
and closing TITLE tags displays in the browser title bar and in the Microsoft®
Windows® taskbar. In Web pages, "Microsoft Internet Explorer" is appended to the
title. In HTML Applications, by contrast, only the specified title appears.
Members
Example
This example uses the TITLE element to specify a title for the document.
<HEAD>
<TITLE>"Welcome to Internet Explorer!"</TITLE>
</HEAD>
Applies To
document
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
TITLE Element | TITLE Obj... TT Element | TT O
Web Workshop | DHTML, HTML & CSS
TR Element | TR Object
Specifies a row in a table.
Remarks
The TR element does not explicitly support the HEIGHT attribute. To achieve the same
effect, use the cascading style sheets (CSS) height attribute.
To change the HTML in the TR element, use the table object model. For example, use
the rowIndex property or the rows collection to retrieve a reference to a specific table
row. You can add or delete rows using the insertRow and deleteRow methods. To
retrieve a reference to a specific cell, use the cellIndex property or the cells collection.
You can add or delete rows using the insertCell and deleteCell methods. To change the
content of a particular cell, use the innerHTML or innerText property.
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
The following examples show how to create a table row in HTML and script.
See Also
TABLE, borderCollapse
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
TR Element | TR Object U Element | U Object
Web Workshop | DHTML, HTML & CSS
TT Element | TT Object
Renders text in a fixed-width font.
Remarks
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
See Also
XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
TT Element | TT Object UL Element | UL Object
Web Workshop | DHTML, HTML & CSS
U Element | U Object
Renders text that is underlined.
Remarks
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
U Element | U Object userProfile Object DHTM
Web Workshop | DHTML, HTML & CSS
UL Element | UL Object
Draws lines of text as a bulleted list.
Remarks
The TYPE attribute sets the list type for all ensuing lists unless a different type value is
set.
The UL element inherits its line-height from the height of the font attribute for the
BODY. For example, if the font-size attribute for the BODY is larger than the font-size
attribute for the UL element, the list items in the UL are spaced according to the font-
size of the BODY.
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
<UL>
<LI>This is the first bulleted item in the list.
<LI>And this is the second bulleted item in the list.
</UL>
See Also
LI
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
UL Element | UL Object VAR Element | VAR Obj
Web Workshop | DHTML, HTML & CSS
userProfile Object
Provides methods that allow a script to request read access to and perform read actions on
a user's profile information.
Remarks
The script request is queued before reading or writing is performed. This simplifies
user experience, because users are prompted only once for profile release permissions
for a batch of requests.
Members
Example
This script example runs on the client and uses the userProfile object to read various
values from the profile information.
// The script can now use the 'name' and 'gender' variables
// to personalize content or to send information back to the
server.
Applies To
clientInformation, navigator
See Also
profile assistantI
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
userProfile Object WBR Element | WBR Object
Web Workshop | DHTML, HTML & CSS
VAR Element | VAR Object
Renders text in a small fixed-width font.
Remarks
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
This example uses the VAR element to render the word "filename" in a small fixed-
width font.
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
VAR Element | VAR Object window Object DH
Web Workshop | DHTML, HTML & CSS
WBR Element | WBR Object
Inserts a soft line break into a block of NOBR text.
Remarks
This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script
as of Internet Explorer 4.0.
Members
Example
This example uses the WBR element to create line breaks. In contrast, the NOBR
element does not break lines.
<NOBR>This line of text will not break, no matter how narrow the
window gets.</NOBR>
<NOBR>This one, however,<WBR> will break after the word
"however,"
if the window gets small enough.</NOBR>
See Also
BR
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
WBR Element | WBR Object XML Element | XML
Web Workshop | DHTML, HTML & CSS
window Object
Represents an open window in the browser.
Remarks
You can use the window object to retrieve information about the state of the window.
You also can use this object to gain access to the document in the window, to the
events that occur in the window, and to features of the browser that affect the window.
Typically, the browser creates one window object when it opens an HTML document.
However, if a document defines one or more frames (that is, contains one or more
FRAME or IFRAME tags), the browser creates one window object for the original
document and one additional window object for each frame. These additional objects
are child windows of the original window and can be affected by actions that occur in
the original. For example, closing the original window causes all child windows to close.
You can also create new windows (and corresponding window objects) using methods
such as open, showModalDialog, and showModelessDialog.
You can apply any window property, method, or collection to any variable or expression
that evaluates to a window object, regardless of how that window was created.
Additionally, you can access all window properties, methods, and collections in the
current window by using the property, method, or collection name directly—that is,
without prefixing it with an expression that evaluates to the current window object.
However, to help make more readable code and to avoid potential ambiguities, many
authors use the window keyword when accessing window properties, methods, and
collections for the current window. This keyword always refers to the current window.
Note Window property, method, and collection names are reserved keywords and
cannot be used as the names of variables and routines.
Windows CE
In Microsoft® Windows® CE, the document object is not available through scripting for
a window opened using the open method.
Members
Example
This example checks whether the current window contains child windows and, if it
does, displays the names of those child windows.
if ( window.frames != null ) {
for ( i = 0; i< window.frames.length; i++ )
window.alert ("Child window " +i+ " is named
"+window.frames(i).name);
}
This example shows a simple event handler function for the window's onload event. In
the absence of a "window" element, the BODY element hosts the following window
object events: onblur, onbeforeunload, onfocus, onload, and onunload.
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
window Object XMP Element | XMP Object DH
Web Workshop | DHTML, HTML & CSS
XML Element | XML Object
Defines an xml data island on an HTML page.
I
Remarks
The readyState property of the XML element, available as a string value, corresponds
to the readystate property of the xmldomdocument object, which is available as a
I I
long value. The string values correspond to the long values of the XML document
object's property as follows:
0 uninitialized
1 loading
2 loaded
3 interactive
4 complete
Use the following two methods to check the value of the readyState property to
determine whether the XML data island is completely downloaded.
if (xmldoc.readyState == "complete")
window.alert ("The XML document is ready.");
if (xmldoc.XMLDocument.readyState == 4)
window.alert ("The XML document is ready.");
Members
Example
This example uses the XML element to define a simple XML data island that can be
embedded directly into an HTML page.
<XML ID="oMetaData">
<METADATA>
<AUTHOR>John Smith</AUTHOR>
<GENERATOR>Visual Notepad</GENERATOR>
<PAGETYPE>Reference</PAGETYPE>
<ABSTRACT>Specifies a data island</ABSTRACT>
</METADATA>
</XML>
This script example retrieves the text contained within the ABSTRACT field of the data
island.
var oNode =
oMetaData.XMLDocument.selectSingleNode("METADATA/ABSTRACT");
alert(oNode.text);
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
XML Element | XML Object DHTML Objects
Web Workshop | DHTML, HTML & CSS
XMP Element | XMP Object
Renders text used for examples in a fixed-width font.
Remarks
Use of this element is no longer recommended. Use the PRE or SAMP element
instead.
Members
See Also
TT
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
INPUT Element | INPUT Obj... INPUT type=che
Web Workshop | DHTML, HTML & CSS
INPUT type=button Element | INPUT type=button Object
Creates a button control.
Remarks
The button element is an inline element and does not require a closing tag.
This element is available in HTML and script as of Microsoft® Internet Explorer 3.0.
Members
Example
This example uses the button element to define a button that responds appropriately
when clicked.
See Also
BUTTON, INPUT
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
INPUT type=button Element... INPUT type=file
Web Workshop | DHTML, HTML & CSS
INPUT type=checkbox Element | INPUT type=checkbox Object
Creates a check box control.
Remarks
When a checkbox element is selected, a name/value pair is submitted with the FORM.
The default value of checkbox is on.
The height and width styles are exposed to the checkbox element as of Microsoft®
Internet Explorer 5. The size of the element is set based on the values provided by the
author, except when a given size is below a particular minimum. The size is calculated
as follows:
If the height or width is greater than 20 pixels, the padding around the check
box is set to 4 pixels, and the inner height or width is set to 8 pixels.
If the height or width is less than 20 pixels but greater than 13 pixels, the
padding around the check box is equal to one half the specified height or width
minus 13. For example, if the specified width of the check box is 17, the
equation would be: (17-13)/2.
If the height or width is less than 12 pixels, the padding around the check box
is set to 0 and the inner width is set to the value specified by the author.
The checkbox element is an inline element and does not require a closing tag.
Members
Example
This example uses the checkbox element to create two check boxes with explanatory
text. The onclick events call two script functions. The first check box is checked.
This example implements the script when the user clicks either check box.
<SCRIPT>
function choosebox1(){
alert("Never play leapfrog with a unicorn!")
}
function choosebox2(){
SampText.insertAdjacentHTML("AfterBegin","Buy
WonderWidgets! ");
}
</SCRIPT>
The preceding HTML code and script examples create and implement the following
check boxes:
See Also
INPUT
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
INPUT type=checkbox Eleme... INPUT type=hid
Web Workshop | DHTML, HTML & CSS
INPUT type=file Element | INPUT type=file Object
Creates a file upload object with a text box and Browse button.
Remarks
To handle a file upload to the server, a server-side process must be running that can
handle multipart/form-data submissions. For example, the microsoft posting acceptor
I
allows Microsoft® Internet Information Server to accept file uploads. Additional
Common Gateway Interface (CGI) scripts that can handle multipart/form-data
submissions are available on the Web.
The file element is an inline element and does not require a closing tag.
This element is available in HTML and script as of Microsoft® Internet Explorer 4.0.
The file upload add-on is required to use the file element in Internet Explorer 3.02.
Users can enter a file path in the text box or click the Browse button to browse the file
system.
Members
Example
The following examples use the file element to upload a file to a server. The first
example requires Microsoft® Posting Acceptor, which can be used with Internet
Information Server (IIS) or Personal Web Server.
See Also
INPUT, upload files to the internet information server , uploading a file to iis using a
I
browser
I
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
INPUT type=file Element |... INPUT type=imag
Web Workshop | DHTML, HTML & CSS
INPUT type=hidden Element | INPUT type=hidden Object
Transmits state information about client/server interaction.
Remarks
This input type presents no control to the user, but sends the value of the value
property with the submitted form.
This element is available in HTML and script as of Microsoft® Internet Explorer 3.0.
Members
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
INPUT type=hidden Element... INPUT type=pas
Web Workshop | DHTML, HTML & CSS
INPUT type=image Element | INPUT type=image Object
Creates an image control that, when clicked, causes the form to be immediately
submitted.
Remarks
The x-coordinate is submitted under the name of the control with .x appended, and the
y-coordinate is submitted under the name of the control with .y appended. Any value
property is ignored. The src property specifies the image element the same way it
specifies the IMG element.
The image element is an inline element and does not require a closing tag.
This element is available in HTML and script as of Microsoft® Internet Explorer 3.0.
Members
See Also
IMG, INPUT
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
INPUT type=image INPUT type=radio DHTML
Web Workshop | DHTML, HTML & CSS
INPUT type=password Element | INPUT type=password Object
Creates a single-line text entry control similar to the text control, except that text is not
displayed as the user enters it.
Remarks
The password element is an inline element and does not require a closing tag.
This element is available in HTML and script as of Microsoft® Internet Explorer 3.0.
Members
Example
This example uses script to determine whether the password is valid for the specified
user.
<SCRIPT>
if (txtUser.value == "Paul")
if (txtPassword.value == "2ifbysea")
{
alert("Password accepted. Enjoy your ride.");
return true;
}
</SCRIPT>
See Also
INPUT
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
INPUT type=password INPUT type=submit D
Web Workshop | DHTML, HTML & CSS
INPUT type=radio Element | INPUT type=radio Object
Creates a radio button control.
Remarks
Use a radio button control to limit a user's selection to a single value within a set of
values. To do this, you must link together each button in a set of radio buttons by
assigning each button the same name.
When a user submits a form, a selected radio button only generates a name/value
pair in the form data if the button has a value.
To select a radio button as the default button in a set, set the checked property of the
button to true.
A user can select a radio button only if the button has a name. To clear a selected
radio button, a user must select another button in the set.
The radio element is an inline element and does not require a closing tag.
This element is available in HTML and script as of Microsoft® Internet Explorer 3.0.
Members
Example
This example uses the radio element to create three radio buttons.
This example uses script to detect which radio button the user selects.
<SCRIPT>
function detect()
{
if (radio[0].checked)
alert("You're between 1 and 10 years old.")
else if (radio[1].checked)
alert("You're 11 years old.")
else
alert("You're between 12 and 120 years old.")
}
</SCRIPT>
The preceding HTML code and script examples create and implement the following
radio buttons.
11 years old
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
INPUT type=radio INPUT type=submit DHTM
Web Workshop | DHTML, HTML & CSS
INPUT type=reset Element | INPUT type=reset Object
Creates a button that, when clicked, resets the form's controls to their initial values.
Remarks
The value property specifies the label displayed on the Reset button the same way it
specifies it on the Submit button.
The reset element is an inline element and does not require a closing tag.
This element is available in HTML and script as of Microsoft® Internet Explorer 3.0.
Members
See Also
BUTTON, INPUT
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
INPUT type=reset INPUT type=text DHTML O
Web Workshop | DHTML, HTML & CSS
INPUT type=submit Element | INPUT type=submit Object
Creates a button that, when clicked, submits the form.
Remarks
Use the value attribute to create a button with a display label that cannot be edited by
the user. The default label is application-specific. If the user clicks the Submit button to
submit the form, and that button has a name attribute specified, that button
contributes a name/value pair to the submitted data.
The submit element is an inline element and does not require a closing tag.
This element is available in HTML and script as of Microsoft® Internet Explorer 3.0.
Members
See Also
BUTTON, INPUT
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
INPUT type=submit INS Element | INS Object
Web Workshop | DHTML, HTML & CSS
INPUT type=text Element | INPUT type=text Object
Creates a single-line text entry control.
Remarks
The SIZE attribute sets the number of visible characters in the text element. The
MAXLENGTH attribute sets the maximum number of characters that can be entered.
The text element is an inline element and does not require a closing tag.
This element is available in HTML and script as of Microsoft® Internet Explorer 3.0.
Members
Example
This example uses the text element to create an empty text control that can contain
15 characters without requiring the user to scroll to read all of the text.
This example uses script to detect the content of the text box and display it in a dialog
box.
<SCRIPT>
function detectEntry()
{
alert("Your name is " + textbox.value)
}
</SCRIPT>
The preceding HTML code and script examples implement the following text box. Click
the What Is Your Name? button to call the detectEntry() function.
See Also
INPUT, TEXTAREA
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
!important Declaration DHTML References
Web Workshop | DHTML, HTML & CSS
DHTML Properties
The following table lists the properties in the Dynamic HTML Object Model. For
properties that appear in multiple table cells, roll the mouse over the text to view a
ToolTip indicating the objects to which the property applies. Click the text to jump to
a full description of that property.
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
empty Method execScript Method DHTML Met
Web Workshop | DHTML, HTML & CSS
execCommand Method
Executes a command over the given selection or text range.
Syntax
Parameters
sCommand Required. String that specifies the command to execute, which can be any valid command identifier.
bUserInterface Optional. Boolean that specifies one of the following values:
false Default. Does not display a user interface.
true Displays a user interface, if the command supports one.
vValue Optional. Variant that specifies the string, number, or other value to assign. Possible values depend on sCommand.
Return Value
Remarks
Do not invoke the execCommand method until after the page loads.
Applies To
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
prompt Method queryCommandIndeterm Meth.
Web Workshop | DHTML, HTML & CSS
queryCommandEnabled Method
Returns whether the command can be successfully executed using execCommand, given
the current state of the document.
Syntax
bEnabled = object.queryCommandEnabled(sCmdID)
Parameters
Return Value
Remarks
Applies To
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
queryCommandEnabled Metho... queryComman
Web Workshop | DHTML, HTML & CSS
queryCommandIndeterm Method
Returns whether the specified command is in the indeterminate state.
Syntax
bIndeterminate = object.queryCommandIndeterm(sCmdID)
Parameters
Return Value
Applies To
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
queryCommandIndeterm Meth... queryComma
Web Workshop | DHTML, HTML & CSS
queryCommandState Method
Returns the current state of the command.
Syntax
bDone = object.queryCommandState(sCmdID)
Parameters
Return Value
Boolean. Returns true if the given command has been executed on the object, false if
it has not, and null if it is not possible to determine the command state.
Applies To
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
queryCommandState Method queryCommandV
Web Workshop | DHTML, HTML & CSS
queryCommandSupported Method
Returns whether the current command is supported on the current range.
Syntax
bSupported = object.queryCommandSupported(sCmdID)
Parameters
Return Value
Applies To
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
queryCommandSupported Met... recalc Method
Web Workshop | DHTML, HTML & CSS
queryCommandValue Method
Returns the current value of the given command.
Syntax
vCmdValue = object.queryCommandValue(sCmdID)
Parameters
Return Value
String or Boolean. Returns a string representing the command value if the command is
supported, or true/false otherwise.
Remarks
If the command returns a value, such as a color, rather than a true/false state, this
command retrieves the current value of the document or range.
Applies To
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
BlockDirLTR Command | IDM... Command Iden
Web Workshop | DHTML, HTML & CSS
BackColor Command | IDM_BACKCOLOR Command ID
Sets or retrieves the background color of the current selection.
Scripting Information
Command BackColor
execCommand vValue Required. String that specifies one of the color names or red-green-blue (RGB) values in the Color Table.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
BlockDirRTL Command | IDM... BrowseMode Co
Web Workshop | DHTML, HTML & CSS
Bold Command | IDM_BOLD Command ID
Toggles the current selection between bold and nonbold.
Scripting Information
Command Bold
execCommand vValue Not applicable.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
BrowseMode Command | IDM_... Copy Comma
Web Workshop | DHTML, HTML & CSS
IECMDID_CLEAR_AUTOCOMPLETE_FOR_FORMS Command ID
Clears saved forms data.
C++ Information
IECMDID_ARG_CLEAR_FORMS_ALL=0
IECMDID_ARG_CLEAR_FORMS_ALL_BUT_PASSWORDS=1
IECMDID_ARG_CLEAR_FORMS_PASSWORDS_ONLY=2
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
IECMDID_CLEAR_AUTOCOMPLET... CreateBook
Web Workshop | DHTML, HTML & CSS
Copy Command | IDM_COPY Command ID
Copies the current selection to the clipboard.
Scripting Information
Command Copy
execCommand vValue Not applicable.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
Copy Command | IDM_COPY C... CreateLink Co
Web Workshop | DHTML, HTML & CSS
CreateBookmark Command | IDM_BOOKMARK Command ID
Retrieves the name of a bookmark anchor or creates a bookmark anchor for the current
selection or insertion point.
Scripting Information
Command CreateBookmark
execCommand vValue Required. String that specifies a valid anchor name. Providing an empty string will create the tag but will leave the anchor
name blank.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
CreateBookmark Command | ... Cut Command
Web Workshop | DHTML, HTML & CSS
CreateLink Command | IDM_HYPERLINK Command ID
Inserts a hyperlink on the current selection.
Scripting Information
Command CreateLink
execCommand vValue Required. String that specifies a URL. Providing an empty string will leave the URL blank.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
CreateLink Command | IDM_... Delete Comman
Web Workshop | DHTML, HTML & CSS
Cut Command | IDM_CUT Command ID
Copies the current selection to the clipboard and then deletes it.
Scripting Information
Command Cut
execCommand vValue Not applicable.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
Cut Command | IDM_CUT Com... DirLTR Comm
Web Workshop | DHTML, HTML & CSS
Delete Command | IDM_DELETE Command ID
Deletes the current selection.
Scripting Information
Command Delete
execCommand vValue Not applicable.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
EditMode Command | IDM_ED... FontName Com
Web Workshop | DHTML, HTML & CSS
Find Command | IDM_FIND Command ID
Finds and selects text in the current document.
Scripting Information
Command Find
execCommand vValue Required. String that specifies the text to be found.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
Find Command | IDM_FIND C... FontSize Comm
Web Workshop | DHTML, HTML & CSS
FontName Command | IDM_FONTNAME Command ID
Sets or retrieves the font for the current selection.
Scripting Information
Command FontName
execCommand vValue Required. String that specifies a legal font name, as described by the FONT attribute.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
FontName Command | IDM_FO... ForeColor Co
Web Workshop | DHTML, HTML & CSS
FontSize Command | IDM_FONTSIZE Command ID
Sets or retrieves the font size for the current selection.
Scripting Information
Command FontSize
execCommand vValue Required. String that specifies the font size, as described by the size attribute. This must be a value between 0 and 7,
inclusive.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
FontSize Command | IDM_FO... FormatBlock Co
Web Workshop | DHTML, HTML & CSS
ForeColor Command | IDM_FORECOLOR Command ID
Sets or retrieves the foreground (text) color of the current selection.
Scripting Information
Command ForeColor
execCommand vValue Required. String that specifies one of the color names or red-green-blue (RGB) values in the Color Table.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
ForeColor Command | IDM_F... IDM_FONT Com
Web Workshop | DHTML, HTML & CSS
FormatBlock Command | IDM_BLOCKFMT Command ID
Sets or retrieves the current block format tag.
Scripting Information
Command FormatBlock
execCommand vValue Optional. String that specifies a valid block formatting tag.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Remarks
The available block formatting strings may change in subsequent releases of the
MSHTML component. Call IOleCommandTarget::Exec with the IDM_GETBLOCKFMTS
Command ID to obtain the current list of available block formatting commands that
can be passed with the IDM_BLOCKFMT Command ID.
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
IDM_GETBLOCKFMTS Command ... InlineDirLTR
Web Workshop | DHTML, HTML & CSS
Indent Command | IDM_INDENT Command ID
Increases the indent of the selected text by one indentation increment.
Scripting Information
Command Indent
execCommand vValue Not applicable.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
InlineDirRTL Command | ID... InsertFieldset Co
Web Workshop | DHTML, HTML & CSS
InsertButton Command | IDM_BUTTON Command ID
Overwrites a button control on the current selection.
Scripting Information
Command InsertButton
execCommand vValue Optional. String that specifies an identifier for the button control.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
InsertButton Command | ID... InsertHorizontal
Web Workshop | DHTML, HTML & CSS
InsertFieldset Command | IDM_INSFIELDSET Command ID
Overwrites a box on the current selection.
Scripting Information
Command InsertFieldset
execCommand vValue Optional. String that specifies an identifier for the box.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
InsertFieldset Command | ... InsertIFrame Com
Web Workshop | DHTML, HTML & CSS
InsertHorizontalRule Command | IDM_HORIZONTALLINE
Command ID
Overwrites a horizontal line on the current selection.
Scripting Information
Command InsertHorizontalRule
execCommand vValue Not applicable.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
InsertHorizontalRule Comm... InsertImage Com
Web Workshop | DHTML, HTML & CSS
InsertIFrame Command | IDM_IFRAME Command ID
Overwrites an inline frame on the current selection.
Scripting Information
Command InsertIFrame
execCommand vValue Optional. String that specifies an identifier for the inline frame.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
InsertIFrame Command | ID... InsertInputButto
Web Workshop | DHTML, HTML & CSS
InsertImage Command | IDM_IMAGE Command ID
Overwrites an image on the current selection.
Scripting Information
Command InsertImage
execCommand vValue Optional. String that specifies the path and name of the image file to be inserted.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Remarks
If no path is provided for the image file, the path will default to the location of the
current document.
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
InsertImage Command | IDM... InsertInputChe
Web Workshop | DHTML, HTML & CSS
InsertInputButton Command | IDM_INSINPUTBUTTON
Command ID
Overwrites a button control on the current selection.
Scripting Information
Command InsertInputButton
execCommand vValue Optional. String that specifies an identifier for the button control.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
InsertInputButton Command... InsertInputFileU
Web Workshop | DHTML, HTML & CSS
InsertInputCheckbox Command | IDM_CHECKBOX Command ID
Overwrites a check box control on the current selection.
Scripting Information
Command InsertInputCheckbox
execCommand vValue Optional. String that specifies an identifier for the check box control.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
InsertInputCheckbox Comma... InsertInputHidd
Web Workshop | DHTML, HTML & CSS
InsertInputFileUpload Command | IDM_INSINPUTUPLOAD
Command ID
Overwrites a file upload control on the current selection.
Scripting Information
Command InsertInputFileUpload
execCommand vValue Optional. String that specifies an identifier for the file upload control.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
InsertInputFileUpload Com... InsertInputImage
Web Workshop | DHTML, HTML & CSS
InsertInputHidden Command | IDM_INSINPUTHIDDEN
Command ID
Inserts a hidden control on the current selection.
Scripting Information
Command InsertInputHidden
execCommand vValue Not applicable.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
InsertInputHidden Command... InsertInputPass
Web Workshop | DHTML, HTML & CSS
InsertInputImage Command | IDM_INSINPUTIMAGE Command
ID
Overwrites an image control on the current selection.
Scripting Information
Command InsertInputImage
execCommand vValue Optional. String that specifies an identifier for the image control.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
InsertInputImage Command ... InsertInputRad
Web Workshop | DHTML, HTML & CSS
InsertInputPassword Command | IDM_INSINPUTPASSWORD
Command ID
Overwrites a password control on the current selection.
Scripting Information
Command InsertInputPassword
execCommand vValue Not applicable.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
InsertInputPassword Comma... InsertInputRese
Web Workshop | DHTML, HTML & CSS
InsertInputRadio Command | IDM_RADIOBUTTON Command ID
Overwrites a radio control on the current selection.
Scripting Information
Command InsertInputRadio
execCommand vValue Optional. String that specifies an identifier for the radio control.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
InsertInputRadio Command ... InsertInputSubm
Web Workshop | DHTML, HTML & CSS
InsertInputReset Command | IDM_INSINPUTRESET Command
ID
Overwrites a reset control on the current selection.
Scripting Information
Command InsertInputReset
execCommand vValue Optional. String that specifies an identifier for the reset control.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
InsertInputReset Command ... InsertInputText
Web Workshop | DHTML, HTML & CSS
InsertInputSubmit Command | IDM_INSINPUTSUBMIT
Command ID
Overwrites a submit control on the current selection.
Scripting Information
Command InsertInputSubmit
execCommand vValue Optional. String that specifies an identifier for the submit control.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
InsertInputSubmit Command... InsertMarquee
Web Workshop | DHTML, HTML & CSS
InsertInputText Command | IDM_TEXTBOX Command ID
Overwrites a text control on the current selection.
Scripting Information
Command InsertInputText
execCommand vValue Optional. String that specifies an identifier for the text control.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
InsertInputText Command |... InsertOrderedLis
Web Workshop | DHTML, HTML & CSS
InsertMarquee Command | IDM_MARQUEE Command ID
Overwrites an empty marquee on the current selection.
Scripting Information
Command InsertMarquee
execCommand vValue Optional. String that specifies an identifier for the marquee.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
InsertMarquee Command | I... InsertParagraph
Web Workshop | DHTML, HTML & CSS
InsertOrderedList Command | IDM_ORDERLIST Command ID
Toggles the current selection between an ordered list and a normal format block.
Scripting Information
Command InsertOrderedList
execCommand vValue Optional. String that specifies an identifier for the ordered list.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Remarks
If the previous format block is already an ordered list, this command identifier will
append the current format block to that previous ordered list.
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
InsertOrderedList Command... InsertSelectDro
Web Workshop | DHTML, HTML & CSS
InsertParagraph Command | IDM_PARAGRAPH Command ID
Overwrites a line break on the current selection.
Scripting Information
Command InsertParagraph
execCommand vValue Optional. String that specifies an identifier for the paragraph.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
InsertParagraph Command |... InsertSelectList
Web Workshop | DHTML, HTML & CSS
InsertSelectDropdown Command | IDM_DROPDOWNBOX
Command ID
Overwrites a drop-down selection control on the current selection.
Scripting Information
Command InsertSelectDropdown
execCommand vValue Optional. String that specifies an identifier for the drop-down selection control.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
InsertSelectDropdown Comm... InsertTextArea
Web Workshop | DHTML, HTML & CSS
InsertSelectListbox Command | IDM_LISTBOX Command ID
Overwrites a list box selection control on the current selection.
Scripting Information
Command InsertSelectListbox
execCommand vValue Optional. String that specifies an identifier for the list box selection control.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
InsertSelectListbox Comma... InsertUnorderedL
Web Workshop | DHTML, HTML & CSS
InsertTextArea Command | IDM_TEXTAREA Command ID
Overwrites a multiline text input control on the current selection.
Scripting Information
Command InsertTextArea
execCommand vValue Optional. String that specifies an identifier for the text input control.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
InsertTextArea Command | ... Italic Command
Web Workshop | DHTML, HTML & CSS
InsertUnorderedList Command | IDM_UNORDERLIST Command
ID
Toggles the current selection between an ordered list and a normal format block.
Scripting Information
Command InsertUnorderedList
execCommand vValue Optional. String that specifies an identifier for the unordered list.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Remarks
If the previous format block is already an ordered list, this command identifier will
append the current format block to that previous ordered list.
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
InsertUnorderedList Comma... JustifyCenter Co
Web Workshop | DHTML, HTML & CSS
Italic Command | IDM_ITALIC Command ID
Toggles the current selection between italic and nonitalic.
Scripting Information
Command Italic
execCommand vValue Not applicable.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
Italic Command | IDM_ITAL... JustifyFull Comm
Web Workshop | DHTML, HTML & CSS
JustifyCenter Command | IDM_JUSTIFYCENTER Command ID
Centers the format block in which the current selection is located.
Scripting Information
Command JustifyCenter
execCommand vValue Not applicable.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
JustifyFull Command | IDM... JustifyNone Comm
Web Workshop | DHTML, HTML & CSS
JustifyLeft Command | IDM_JUSTIFYLEFT Command ID
Left-justifies the format block in which the current selection is located.
Scripting Information
Command JustifyLeft
execCommand vValue Not applicable.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
JustifyNone Command | IDM... Open Command
Web Workshop | DHTML, HTML & CSS
JustifyRight Command | IDM_JUSTIFYRIGHT Command ID
Right-justifies the format block in which the current selection is located.
Scripting Information
Command JustifyRight
execCommand vValue Not applicable.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
Open Command | IDM_OPEN C... OverWrite Co
Web Workshop | DHTML, HTML & CSS
Outdent Command | IDM_OUTDENT Command ID
Decreases by one increment the indentation of the format block in which the current
selection is located.
Scripting Information
Command Outdent
execCommand vValue Not applicable.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
Outdent Command | IDM_OUT... Paste Comma
Web Workshop | DHTML, HTML & CSS
OverWrite Command | IDM_OVERWRITE Command ID
Toggles the text-entry mode between insert and overwrite.
Scripting Information
Command OverWrite
execCommand vValue Optional. Boolean that specifies the text-entry mode. If the value is set to true (the default), the text-entry mode is
overwrite. If set to false, it is insert.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
OverWrite Command | IDM_O... PlayImage Com
Web Workshop | DHTML, HTML & CSS
Paste Command | IDM_PASTE Command ID
Overwrites the contents of the clipboard on the current selection.
Scripting Information
Command Paste
execCommand vValue Not applicable.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
Redo Command | IDM_REDO C... RemoveForm
Web Workshop | DHTML, HTML & CSS
Refresh Command | IDM_REFRESH Command ID
Refreshes the current document.
Scripting Information
Command Refresh
execCommand vValue Not applicable.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
Refresh Command | IDM_REF... RemoveParaFo
Web Workshop | DHTML, HTML & CSS
RemoveFormat Command | IDM_REMOVEFORMAT Command ID
Removes the formatting tags from the current selection.
Scripting Information
Command RemoveFormat
execCommand vValue Not applicable.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
SaveAs Command | IDM_SAVE... SizeToControl
Web Workshop | DHTML, HTML & CSS
SelectAll Command | IDM_SELECTALL Command ID
Selects the entire document.
Scripting Information
Command SelectAll
execCommand vValue Not applicable.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
SuperScript Command | IDM... Underline Comm
Web Workshop | DHTML, HTML & CSS
UnBookmark Command | IDM_UNBOOKMARK Command ID
Removes any bookmark from the current selection.
Scripting Information
Command UnBookmark
execCommand vValue Not applicable.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
UnBookmark Command | IDM_... Undo Comma
Web Workshop | DHTML, HTML & CSS
Underline Command | IDM_UNDERLINE Command ID
Toggles the current selection between underlined and not underlined.
Scripting Information
Command Underline
execCommand vValue Not applicable.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
Undo Command | UNDO Comma... Unselect Co
Web Workshop | DHTML, HTML & CSS
Unlink Command | IDM_UNLINK Command ID
Removes any hyperlink from the current selection.
Scripting Information
Command Unlink
execCommand vValue Not applicable.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
Unlink Command | IDM_UNLI... Command Iden
Web Workshop | DHTML, HTML & CSS
Unselect Command | IDM_CLEARSELECTION Command ID
Clears the current selection.
Scripting Information
Command Unselect
execCommand vValue Not applicable.
Applies to execCommand, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported,
queryCommandValue
C++ Information
Minimum Availability
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
In implementing dhtml behavi... DHTML, HTML &
Web Workshop | DHTML, HTML & CSS
Default Behaviors Reference
dhtml behaviors provide a means for Web developers to extend the Microsoft® Internet
I
Explorer current object model. A number of behaviors have been implemented as part of
Internet Explorer 5 and are referred to as default behaviors.
The following links provide access to the object model exposed by these default behaviors.
Behaviors
Properties
Methods
Events
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
ISO Latin-1 Character Set DHTML References
Web Workshop | DHTML, HTML & CSS
HTML Character Sets
Character sets determine how the bytes that represent the text of your HTML document
are translated to readable characters. Microsoft® Internet Explorer interprets the bytes in
your document according to the applied character set translations. It interprets numeric or
hex character references ("〹" or "ሴ") as ISO10646 code points,
consistent with the Unicode Standard, version 2.0, and independent of the chosen
character set. Named entities ("&") are displayed independently of the chosen character
set as well. The display of an arbitrary numeric character reference requires the existence
of a font that is able to display that particular character on the user's system. Accordingly,
the content in the first column of the following tables may not render as expected on all
systems.
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
all Collection DHTML References
Web Workshop | DHTML, HTML & CSS
DHTML Collections
The following is a list of the collections exposed by the Dynamic
HTML Object Model.
Did you find this topic useful? Suggestions for other topics? write
us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
onabort Event DHTML References
Web Workshop | DHTML, HTML & CSS
DHTML Events
The following events are exposed by the Dynamic HTML Object Model.
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
add DHTML References
Web Workshop | DHTML, HTML & CSS
DHTML Methods
The following is a list of the methods exposed by the
Dynamic HTML Object Model.
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Color Table In dhtml tutorialsInt DHTML Reference
Web Workshop | DHTML, HTML & CSS
Tips and Tricks
As with any type of programming, writing bug-free, efficient scripts that meet your
expectations takes a bit of work. The following sections provide some tips and hints to
make that work take less time and go more smoothly.
function msieversion()
// Return Microsoft Internet Explorer (major) version number, or 0
for others.
// This function works by finding the "MSIE " string and extracting
the version number
// following the space, up to the decimal point for the minor
version, which is ignored.
{
var ua = window.navigator.userAgent
var msie = ua.indexOf ( "MSIE " )
if ( msie > 0 ) // is Microsoft Internet Explorer;
return version number
return parseInt ( ua.substring ( msie+5, ua.indexOf ( ".",
msie ) ) )
else
return 0 // is other browser
}
This function runs on most browsers and returns either the major version number for any
Microsoft Internet Explorer browser or zero for all other browsers. Use of this function
ensures that the script will be compatible with future versions of Internet Explorer.
Scripts should always check version numbers greater than or equal to a target version so
as to be compatible with future versions. Existing scripts that check for userAgent equal to
"MSIE 3" should be changed to check the version correctly so that these scripts will
recognize Internet Explorer 4.0, which supports all of the functionality of the previous
version.
The following example shows how to correctly check the client browser version.
if ( msieversion() >= 4 )
document.alert( "This is IE4 or later - safe to use all IE4
features" )
else if ( msieversion() >= 3 )
document.alert( "This is IE3 - safe to use ActiveX" )
else
document.alert( "This is not IE" )
Canceling a Button Click
The following HTML example shows a common scripting mistake related to event handling
and canceling the default action.
<HTML>
<HEAD><TITLE>Canceling the Default Action</TITLE>
<SCRIPT LANGUAGE=
"JScript"> function askConfirm()
{ return window.confirm ("Choose OK to follow hyperlink, Cancel
to
not.")
}
</SCRIPT> <BODYonload="b3.onclick=askConfirm">
<!-- Try links with different hookups - should be canceled by
"Cancel" to confirm dialog. -->
</BODY>
</HTML>
The first A element in this example does not work properly. Without the return in the
onclick JScript expression, the browser interprets the function expression, throws away the
resulting value, and leaves the default action unaffected.
The other A elements correctly bind the return value to the event, hence the default action
can be canceled when false is returned.
Preventing a Document From Being Cached
You can prevent a document from being cached by adding the following META tag to the
document.
Preventing the document from being cached ensures that a fresh copy of the document will
always be retrieved from the site, even during the user's current session, regardless of
how the user has set the browser's caching options. This is useful if the content of the
document changes frequently.
Using Objects
Objects are ActiveX® Controls or other similar components that provide custom
capabilities and services for HTML documents. You can add a control to your document by
using the OBJECT element, and you can gain access to the capabilities and services of the
control by using its properties and methods from script.
When using objects, be aware that Dynamic HTML extends every object by providing these
additional properties:
If a control has properties with these same names, you will not be able to access the
properties unless you preface the name with the object property. For example, assume
that an ActiveX control is added to the document by using the following:
In this example, there are two widths: an extended property set within the OBJECT
element, and a property belonging to the control that is set using the PARAM element. To
access these from script, you use the following code:
var tickDuration;
tickDuration = 50;
var activeObjectCount;
var activeObjects;
var itemDeactivated;
var tickGeneration;
tickGeneration = 0;
function initializePath(e) {
e.waypointX = new Array();
e.waypointY = new Array();
e.duration = new Array();
function compact() {
var i, n, c;
n = new Array();
c = 0;
itemDeactivated = false;
for (i=0; i<activeObjectCount; i++) {
if (activeObjects[i].active == true) {
n[c] = activeObjects[i];
c++;
}
}
activeObjects = n;
activeObjectCount = c;
}
function tick(generation) {
//alert("tick: "+generation);
if (itemDeactivated)
compact();
if (activeObjectCount == 0) {
return;
}
else {
for (i=0; i<activeObjectCount; i++) {
moveElement(activeObjects[i]);
}
window.setTimeout("tick("+generation+");", tickDuration);
}
}
function start(e) {
if (itemDeactivated)
compact();
activeObjects[activeObjectCount] = e;
activeObjectCount++;
if (activeObjectCount == 1) {
tickGeneration++;
tick(tickGeneration);
}
}
if (e.waypointX == null)
return;
startX = e.waypointX[startPoint];
startY = e.waypointY[startPoint];
endX = e.waypointX[endPoint];
endY = e.waypointY[endPoint];
duration = e.duration[endPoint];
e.ticks = duration / tickDuration;
e.endPoint = endPoint;
e.active = true;
e.currTick = 0;
e.style.posLeft = startX;
e.style.posTop = startY;
start(e);
}
function moveElement(e) {
e.style.posLeft += e.dx;
e.style.posTop += e.dy;
e.currTick++;
1. Load the script by using the src attribute of the SCRIPT element.
2. Initialize the paths by using the initializePath function.
3. Set the way points by using the addWaypoint function.
4. Set the path-complete handlers using the runWaypoint function.
<body>
<script src="htmlpath.js">
</script>
<script>
addWaypoint(Item4, 0, 0, 0, 0);
addWaypoint(Item4, 1, 200, 200, 2000);
function endfunction() {
// syntax for runWaypoint is Item, start point, end point
runWaypoint(Item3, 0, 1);
runWaypoint(Item4, 0, 1);
runWaypoint(Item5, 0, 1);
runWaypoint(Item6, 0, 1);
function endfunction2() {
runWaypoint(Item1, 0, 1);
}
Item1.onpathcomplete = endfunction;
Item6.onpathcomplete = endfunction2;
</script>
</body>
</html>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the latest
version. Then reload this page to view the sample.
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
DHTML, HTML & CSS
Web Workshop | DHTML, HTML & CSS
Visual Filters and Transitions Reference
With the introduction of Microsoft® Internet Explorer 4.0,
Web page authors can now apply multimedia-style effects to
their content through the use of visual filters and
transitions. These effects are implemented in Web pages
using a cascading style sheet (CSS) attribute. Visual filters
and transitions can be applied to standard HTML controls,
such as text containers, images, and any other windowless
object. Transitions are time-varying filters that can create a
transition from one visual state to another. By combining
filters and transitions with basic scripting, authors have a
powerful tool for creating visually engaging and interactive
documents.
Filters
Properties
Methods
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
!DOCTYPE Element
Web Workshop | DHTML, HTML & CSS
HTML Elements
The following topics list the set of elements defined by
HTML. The links take you to the element definitions, which
contain the set of members for the element.
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
font-variant Attribute | ... form Property DHT
Web Workshop | DHTML, HTML & CSS
font-weight Attribute | fontWeight Property
Sets or retrieves the weight of the font of the object.
Syntax
Possible Values
The property is read/write with a default value of normal; the cascading style sheets
(CSS) attribute is inherited.
Key words for font-weight values are mapped to specific font variations depending on
the fonts that are installed on the user's computer. In many cases, the user cannot see
the difference between different font-weight settings because the system chooses the
closest match.
Setting the font-weight to 400 is equivalent to normal, and 700 is equivalent to bold.
A font-weight of bolder or lighter is interpreted relative to the parent object's
weight. A value of bolder for text whose parent is normal would set the text to bold.
Internet Explorer 3.0 supports the font-weight attribute through the font attribute.
Example
The following examples use the font-weight attribute and the fontWeight property
to change the font weight.
This example uses LI as a selector in an embedded (global) style sheet to set the font
weight to bolder.
<STYLE>
LI { font-weight:bolder }
</STYLE>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to set the font weight to bolder when an
onmouseover event occurs.
<P STYLE="font-size:14"
onmouseover="this.style.fontWeight='bolder'">
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
A, ADDRESS, B, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, currentStyle, custom, DD, DFN, DIR, DIV,
DL, DT, EM, FIELDSET, FORM, Hn, HTML, I, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT
type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING,
MARQUEE, MENU, OL, P, PLAINTEXT, PRE, runtimeStyle, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE, TBODY, TD,
TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP
See Also
font
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
Web Workshop | Component
Development
Component Development
For navigation tips, please see using this site .
I
This section contains information you'll need to create
components for your Web pages, using either ActiveX™ or
Dynamic HTML scriptlet technology.
ActiveX
We recommend reading the ActiveX controls introduction
I
and overview for starters. For a sampling of the
I
technology's versatility, read using activex with asp ,
I
creating activex components in c++ , and the abcs of mfc
I
activex controls .
I
HTML Components
Get acquainted with the DHTML Scriptlets Introduction and
Overview before diving into the Container Object Reference
and the Object Model Extensions.
To See
Understand scriptlets and how they work Scriptlets Overview
Create scriptlets and add them to your applications Designing and Using
Scriptlets
Find descriptions of the properties, methods, and events that you can use Scriptlet Container
when including a scriptlet in your application Object Reference
Find descriptions of the properties, methods, and events that you can use Scriptlet Model
when creating a scriptlet Extensions
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Welcome to Scriptlet Tech...
Web Workshop | Component
Development
Designing a Scriptlet
A scriptlet is simply a DHTML page that uses certain
conventions to define its properties, methods, and events.
Note You can determine from within the .htm file whether it
is being used as a scriptlet or simply as a standalone Web
page. For details, see the version property.
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Welcome to Scriptlet Tech...
Web Workshop | Component
Development
Adding Scriptlets to Your Application
You can use scriptlets as you would any control.
<OBJECT ID="Scriptlet1"
TYPE="text/x-scriptlet"
DATA="http://myserver/sample.htm">
You can also resize the container object from within the
scriptlet by using a script to set the DHTML script object's
pixelHeight and pixelWidth properties. The following
example shows how you can resize the scriptlet container
when the scriptlet is first loaded.
<HTML ID="MyPage">
<HEAD>
<SCRIPT LANGUAGE="VBScript">
Sub window_onload()
MyPage.style.pixelHeight = 300
MyPage.style.pixelWidth = 400
End Sub
</SCRIPT>
</HEAD>
If you change the .htm file after creating the control, the
display in the control is not updated until the next time the
page is read. This occurs when the application is run or if
you change the url property of the control again.
ScriptContainer1.ToggleColor (0)
See Also
Scriptlets Overview
Designing a Scriptlet
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Welcome to Scriptlet Tech...
Web Workshop | Component
Development
Defining Event Handlers
When you use a scriptlet in your host application, the
application can be notified about events that occur in the
scriptlet. The scriptlet can expose two types of events:
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
frozen Property Welcome to Scriptlet Tech...
Web Workshop | Component Development
event Property
Provides state information about a standard DHTML event passed from the scriptlet.
Applies To
Syntax
value = ScriptContainer.event.member
Remarks
This property is read-only. The event property provides a way to get state information
about any of the standard events passed from the scriptlet: onclick, ondblclick,
onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseup. This
property corresponds to the DHTML event object.
To get state information, you can query the values of the event property's members,
which include altKey, ctrlKey, keyCode, offsetX, offsetY, shiftKey,
srcElement, type, and others. The following example script illustrates how you can
use the event property to get more information about a standard event:
Sub ScriptContainer1_onkeyup()
MsgBox "The character typed was " &
ScriptContainer1.event.keyCode
MsgBox "The Alt key state was " &
ScriptContainer1.event.altKey
MsgBox "The Ctrl key state was " &
ScriptContainer1.event.ctrlKey
MsgBox "The Shift key state was " &
ScriptContainer1.event.shiftKey
MsgBox "The mouse was at " & offsetX & ", " & offsetY
MsgBox "The affected control was " &
ScriptContainer1.event.srcElement
MsgBox "The event was " & ScriptContainer1.event.type
End Sub
For more information about using the event property, refer to the event object in the
DHTML documentation.
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
frozen Property scrollbar Property Welcome to
Web Workshop | Component Development
readyState Property
Returns information about the load state of the scriptlet hosted in the container object.
Applies To
Syntax
ScriptContainer.readyState = integer
Remarks
The readyState property returns an integer value between 1 and 4 indicating the load
state of the scriptlet, with the following values:
Value Definition
1 or 2 Undefined
3 Scriptlet text has been loaded, but controls on the scriptlet's .htm page might not yet be functional.
4 Scriptlet is completely loaded
In general, you should not attempt to access the scriptlet's functionality before the
readyState property is set to 4. You can check the value of this property in a handler for
the onreadystatechange event.
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
scrollbar Property selectableContent Propert...
Web Workshop | Component Development
scrollbar Property
Specifies whether the scriptlet container object displays a scrollbar.
Applies To
scriptlet
Syntax
window.external.scrollbar = boolean
Remarks
This property provides a way to set the scriptlet container object's scrollbar property from
within the scriptlet.
By default, the value of this property is false. If you set this property to true:
A vertical scrollbar always appears in the scriptlet container object. If the scriptlet's
height is less than the height of the scriptlet container object's window, the vertical
scrollbar is disabled.
A horizontal scrollbar appears if the scriptlet's width is greater than the width of the
scriptlet container object's window
To set the size of the scriptlet container object window from within the scriptlet, see
Adding Scriptlets to Your Application.
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
selectableContent Propert... version Property
Web Workshop | Component Development
url Property
Specifies the Universal Resource Locator (URL) of the scriptlet's .htm file to be displayed in
the scriptlet container object.
Applies To
Syntax
ScriptContainer.url = URLString
Remarks
You can specify the URL of any .htm file, either local or on a Web server. This property can
be set at design time only.
Important If you are adding the scriptlet to a Web page, do not set this property to the
URL of the current page. Doing so causes a recursive call to the page and will cause the
browser stop functioning.
If you are using the scriptlet in a host application that has a Web context (such as Internet
Explorer), you can specify an absolute path (for example, http://myserver/start.htm) or a
relative path that does not include the protocol, or domain, or path (for example,
page2.htm). If you specify a relative URL, the path is relative to the page in which the
scriptlet appears.
If you specify a URL that is not valid, no error message is displayed, but the scriptlet
container object remains blank.
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
ondblClick Event Welcome to Scriptlet Tech...
Web Workshop | Component Development
onclick Event
Sent when the scriptlet forwards an onclick event.
JavaScript Syntax
Remarks
The scriptlet container object receives this event if both of these conditions are true:
Applies To
Scriptlet container object
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
onClick Event onkeyDown Event Welcome to
Web Workshop | Component Development
ondblclick Event
Sent when the scriptlet forwards an ondblclick event.
ScriptContainer_ondblClick()
JavaScript Syntax
Remarks
The scriptlet container object receives this event if both of these conditions are true:
Applies To
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
ondblClick Event onkeyPress Event Welcome
Web Workshop | Component Development
onkeydown Event
Sent when the scriptlet forwards an onkeydown event.
ScriptContainer_onkeydown()
JavaScript Syntax
Remarks
The scriptlet container object receives this event if both of these conditions are true:
Applies To
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
onkeyDown Event onkeyUp Event Welcome to
Web Workshop | Component Development
onkeypress Event
Sent when the scriptlet forwards an onkeypress event.
Applies To
ScriptContainer_onkeypress()
JavaScript Syntax
Remarks
The scriptlet container object receives this event if both of these conditions are true:
The scriptlet's handler calls the bubbleEvent method to pass the event to the host
application.
You can get information about the state of the event by querying the scriptlet object
container's event property.
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
onkeyPress Event onmousedown, onmouseup E
Web Workshop | Component Development
onkeyup Event
Sent when the scriptlet forwards an onkeyup event.
Applies To
ScriptContainer_onkeyup()
JavaScript Syntax
Remarks
The scriptlet container object receives this event if both of these conditions are true:
The scriptlet's handler calls the bubbleEvent method to pass the event to the host
application.
You can get information about the state of the event by querying the scriptlet object
container's event property.
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
onkeyUp Event onmousemove Event Welcom
Web Workshop | Component Development
onmousedown, onmouseup Events
Sent when the scriptlet forwards an onmousedown or onmouseup event.
Applies To
ScriptContainer_onmousedown()
ScriptContainer_onmouseup()
JavaScript Syntax
Remarks
The scriptlet container object receives this event if both of these conditions are true:
The scriptlet's handler calls the bubbleEvent method to pass the event to the host
application.
You can get information about the state of the event by querying the scriptlet object
container's event property.
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
onmousedown, onmouseup Ev... onreadystatec
Web Workshop | Component Development
onmousemove Event
Sent when the scriptlet forwards an onmousemove event.
Applies To
ScriptContainer_onmousemove()
JavaScript Syntax
Remarks
The scriptlet container object receives this event if both of these conditions are true:
The scriptlet's handler calls the bubbleEvent method to pass the event to the host
application.
You can get information about the state of the event by querying the scriptlet object
container's event property.
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
onmousemove Event onscriptletevent Event W
Web Workshop | Component Development
onreadystatechange Event
Sent to indicate whether the scriptlet has completed loading.
Applies To
ScriptContainer_onreadystatechange ()
JavaScript Syntax
Remarks
This event is fired multiple times while the scriptlet is loading. The final time, it indicates
that the scriptlet's .htm page is fully loaded and its scripts can be called. To test the
current state, you can get the value of the scriptlet container object's readystate property.
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
onreadystatechange Event Welcome to Scriptle
Web Workshop | Component Development
onscriptletevent Event
Notifies the scriptlet container object that a custom event has occurred in the scriptlet.
Applies To
Syntax
Parameters
eventName
eventObject
Note The exact content of both parameters depends on what information was passed in
the scriptlet's corresponding raiseEvent method.
Remarks
This event is the complement of the scriptlet's raiseEvent method. For more information,
see Defining Custom Events. For information about notifying the host application about
standard events, see Handling Standard Events.
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
event Property readyState Property Welcome
Web Workshop | Component Development
frozen Property
Indicates whether the scriptlet container object is ready to handle events.
Applies To
Scriptlet
Syntax
boolean = window.external.frozen
Remarks
This property is read-only. When it is True, events will not be received by the scriptlet
container object because the container is not yet ready. When it is False, the container will
receive event notification.
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
scrollbar Property url Property Welcome to Sc
Web Workshop | Component Development
selectableContent Property
Specifies whether the user can select the contents of the scriptlet.
Applies To
Scriptlet
Syntax
window.external.selectableContent = boolean
Remarks
By default, the value of this property is false. If this property is true, users can select text
or objects in the scriptlet while it is shown in the scriptlet container object, and then copy
or drag them. If this property is false, users can click objects in the scriptlet, but cannot
select them.
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
url Property Welcome to Scriptlet Tech...
Web Workshop | Component Development
version Property
Returns the version and platform of the scriptlet container object DLL.
Applies To
Scriptlet
Syntax
version = window.external.version
Remarks
1.0a win32
You can use the version property to determine whether the page is being used
as a scriptlet or as a standalone Web page. Use a statement such as the following:
If the value of controlMode is true after this statement has executed, the page
is being used as a scriptlet. Otherwise the page is being used as a standalone
page.
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
raiseEvent Method Welcome to Scriptlet Tech...
Web Workshop | Component Development
bubbleEvent Method
Sends event notification for a standard event to the host application.
Applies To
Scriptlet
Syntax
window.external.bubbleEvent()
Remarks
Use this method to pass a standard DHTML event (such as onbuttonclick, onmousemove,
or onkeypress) from the scriptlet to the host application. For more details, see Handling
Standard Events.
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
bubbleEvent Method setContextMenu Method
Web Workshop | Component Development
raiseEvent Method
Passes a custom event notification from the scriptlet to the host application.
Applies To
Scriptlet
Syntax
Parameters
eventName
eventObject
A variant type that typically includes a reference to the object on the scriptlet that
triggered the event.
Remarks
This method is the complement of the scriptlet container object's onscriptletevent event.
Use this method to notify the host application about a non-standard event. For more
information, see Defining Custom Events. For information about notifying the host
application about standard events, see Handling Standard Events.
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
raiseEvent Method Welcome to Scriptlet Tech...
Web Workshop | Component Development
setContextMenu Method
Constructs a context menu that is displayed when a user right-clicks a scriptlet in the
scriptlet container object.
Applies To
Scriptlet
Syntax
window.external.setContextMenu( menuDefinition )
Parameters
menuDefinition
Defines the command text and commands contained in the context menu. A one-
dimensional array in which the menu items are defined using sequences of two
elements, n and n+1.
Element n The command text. Shortcut keys are defined by preceding a letter with "&".
Element n+1 The method to be called when the command is chosen. You cannot pass parameters to the method.
Note Context menus can only be defined in scripts written in VBScript or JavaScript,
because only those languages can create arrays usable by the setContextMenu
method.
For example, the following script defines a context menu with three commands:
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
BEHAVIOR Attribute | beha... BGCOLOR Attribu
Web Workshop | DHTML, HTML & CSS
behavior Attribute | behavior Property
Sets or retrieves the location of the dynamic html (dhtml) behavior .
I
Syntax
Possible Values
The property is read/write with no default value; the proposed cascading style sheets
(CSS) extension attribute is not inherited.
In the following Example section, one example demonstrates how two behaviors can
be applied to an element to achieve a combination of effects. Conflicts resulting from
applying multiple behaviors to an element are resolved based on the order in which the
behavior is applied to the element. Each succeeding behavior takes precedence over
the previous behavior in the order. For example, if multiple behaviors set the element's
color, the prevailing color is the one set by the behavior last applied to the element.
The same rule applies in resolving name conflicts, such as with property, method, or
event names exposed by multiple behaviors.
Once the behavior property has been defined for the element, the addBehavior
method can be used to dynamically attach additional behaviors to the element.
The following examples demonstrate various ways of applying the behavior property
on a page.
Applies To
A, ACRONYM, ADDRESS, APPLET, AREA, B, BASE, BASEFONT, BGSOUND, BIG, BLOCKQUOTE, BODY, BR, BUTTON, CAPTION, CENTER, CITE, CODE,
COL, COLGROUP, COMMENT, custom, DD, DEL, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, FRAME, FRAMESET, HEAD, Hn, HR,
HTML, I, IFRAME, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=hidden, INPUT type=image, INPUT
type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, INS, ISINDEX, KBD, LABEL, LEGEND, LI, LINK,
LISTING, MAP, MARQUEE, MENU, NEXTID, NOBR, NOFRAMES, NOSCRIPT, OBJECT, OL, OPTION, P, PLAINTEXT, PRE, Q, RT, RUBY, S, SAMP,
SCRIPT, SELECT, SMALL, SPAN, STRIKE, STRONG, STYLE, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TITLE, TR, TT, U, UL, VAR,
WBR, XML, XMP
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
DIRECTION Attribute | dir... DISABLED Attribut
Web Workshop | DHTML, HTML & CSS
direction Attribute | direction Property
Sets or retrieves the reading order of the specified object.
Syntax
HTML { direction:sDirection }
Scripting object.style.direction [ =sDirection ]
Possible Values
A, ACRONYM, ADDRESS, AREA, B, BDO, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, currentStyle,
custom, DD, DEL, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, Hn, I, IMG, INPUT type=button, INPUT type=checkbox, INPUT
type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, INS, KBD,
LABEL, LEGEND, LI, LISTING, MAP, MARQUEE, MENU, NOBR, OBJECT, OL, OPTION, P, PLAINTEXT, PRE, Q, RT, RUBY, runtimeStyle, S, SAMP,
SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP
See Also
dir
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
float Attribute | styleFl... font-family Attribute |
Web Workshop | DHTML, HTML & CSS
font Attribute | font Property
Sets or retrieves up to six separate font properties of the object.
Syntax
Possible Values
sFont String that specifies up to six of the space-delimited values listed first in the following table, plus one or more of the values listed after them:
font-style Any of the range of font-style values available to the fontStyle property.
font-variant Any of the range of font-variant values available to the fontVariant property.
font-weight Any of the range of font-weight values available to the fontWeight property.
font-size Any of the range of font-size values available to the fontSize property.
line-height Any of the range of line-height values available to the lineHeight property.
font-family Any of the range of font-family values available to the fontFamily property.
caption Text font used in objects that have captions (buttons, labels, and so on).
icon Text font used in icon labels.
menu Text font used in menus.
messagebox Text font used in dialog boxes.
smallcaption Text font used in small controls.
statusbar Text font used in window status bars.
The property is read/write with the default value set by the browser; the cascading
style sheets (CSS) attribute is inherited.
This is a composite property that specifies up to six font values, in the following order:
font-style, font-variant, font-weight, font-size, line-height, font-family. Setting
the font property also sets the component properties. In this case, the string must be
a combination of valid values for the component properties, with no more than one
value per property. If the string does not contain a value for a component property,
that property is set to its default.
Example
The following examples use the font attribute and the font property to change font
characteristics.
This example uses an inline style sheet to set the font attributes.
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
A, ADDRESS, B, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, custom, DD, DFN, DIR, DIV, DL, DT, EM,
FIELDSET, FORM, Hn, HTML, I, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password,
INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, OL, P,
PLAINTEXT, PRE, runtimeStyle, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH,
THEAD, TR, TT, U, UL, VAR, XMP
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
@charset Rule @import Rule DHTML Propertie
Web Workshop | DHTML, HTML & CSS
@font-face Rule
Sets a font to embed in the HTML document.
Syntax
Possible Values
This feature allows you to use specific fonts that might not be available on your local
system. The URL should point to an embedded OpenType file (.eot or .ote format). The
file contains compressed font data that is converted to a TrueType font. For more
information about the font embedding feature and pointers to a tool for creating .eot
files, see font embedding .
I
Example
This example embeds a font in an HTML document by referencing its source from
another site.
<HTML>
<HEAD>
<STYLE>
@font-face {
font-family:comic;
src:url(http://valid_url/some_font_file.eot);
}
</STYLE>
</HEAD>
<BODY>
<P STYLE="font-family:comic;font-size:18pt">
This paragraph uses the font-face rule defined
in the above style element. The rule embeds
an OpenType file for the Comic Sans font.
</P>
</BODY>
</HTML>
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
font Attribute | font Pro... font-size Attribute | f
Web Workshop | DHTML, HTML & CSS
font-family Attribute | fontFamily Property
Sets or retrieves the name of the font used for text in the object.
Syntax
Possible Values
The property is read/write with the default value set by the browser; the cascading
style sheets (CSS) attribute is inherited.
The value is a prioritized list of font family names and/or generic family names. List
items are separated by commas to minimize confusion between multiple-word font
family names. If the font family name contains white space, it should be quoted with
single or double quotation marks; generic font family names are values and,
accordingly, no quotes should be used.
Because you don't know which fonts users have installed, you should provide a list of
alternatives with a generic font family at the end of the list. This list can include
embedded fonts. For more information about embedding fonts, see the @font-face
rule.
If fantasy is specified for generic-name, the text renders in the default font.
Example
The following examples use the font-family attribute and the fontFamily property to
change font characteristics.
This example uses a call to an embedded style sheet to set the font family.
<STYLE>
P { font-family:"Arial"}
.other { font-family:"Courier"}
</STYLE>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to change the font family when an onmousedown
event occurs.
<DIV onmousedown="this.style.fontFamily='Courier'">
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
A, ADDRESS, B, BASEFONT, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, currentStyle, custom, DD, DFN,
DIR, DIV, DL, DT, EM, FIELDSET, FORM, Hn, HTML, I, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT
type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING,
MARQUEE, MENU, OL, P, PLAINTEXT, PRE, runtimeStyle, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE, TBODY, TD,
TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP
See Also
font
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
font-family Attribute | f... fontSmoothingEnable
Web Workshop | DHTML, HTML & CSS
font-size Attribute | fontSize Property
Sets or retrieves the size of the font used for text in the object.
Syntax
Possible Values
The property is read/write with a default value of medium; the cascading style sheets
(CSS) attribute is inherited.
Negative values are not allowed. Font sizes using the proportional "em" measure are
based on the font size of the parent object.
Possible length values specified in a relative measurement, using the height of the
element's font (em) or the height of the letter "x" (ex), are supported in Internet
Explorer 4.0 and later.
Example
The following examples use the font-size attribute and the fontSize property to
change font characteristics.
This example sets the font size on several paragraphs using different size values.
<STYLE>
BODY{font-size: 10pt }
.P1 {font-size: 14pt }
.P2 {font-size: 75% }
.P3 {font-size: xx-large }
.P4 {font-size: larger }
</STYLE>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to set the font size to 14pt when an onmouseover
event occurs.
<DIV STYLE="font-size:12pt"
onmouseover="this.style.fontSize='14pt'">
:
</DIV>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
A, ADDRESS, APPLET, B, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, currentStyle, custom, DD, DFN,
DIR, DIV, DL, DT, EM, FIELDSET, FORM, Hn, HTML, I, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT
type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING,
MARQUEE, MENU, OL, P, PLAINTEXT, PRE, runtimeStyle, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE, TBODY, TD,
TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
fontSmoothingEnabled Prop... font-variant Attr
Web Workshop | DHTML, HTML & CSS
font-style Attribute | fontStyle Property
Sets or retrieves the font style of the object as italic, normal, or oblique.
Syntax
Possible Values
The property is read/write with a default value of normal; the cascading style sheets
(CSS) attribute is inherited.
The oblique value is available as of Internet Explorer 4.0. Internet Explorer 4.0
renders italic and oblique identically.
Example
The following examples use the font-style attribute and the fontStyle property to
change font characteristics.
This example uses H3 as a selector to set the font style to italic in H3 headings.
<STYLE>
H3 { font-style:italic }
</STYLE>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to set the font style to italic when an
onmousedown event occurs.
<DIV onmousedown="this.style.fontStyle='italic'">
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
A, ADDRESS, B, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, currentStyle, custom, DD, DFN, DIR, DIV,
DL, DT, EM, FIELDSET, FORM, Hn, HTML, I, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT
type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING,
MARQUEE, MENU, OL, P, PLAINTEXT, PRE, runtimeStyle, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE, TBODY, TD,
TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP
See Also
font
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
font-style Attribute | fo... font-weight Attribute
Web Workshop | DHTML, HTML & CSS
font-variant Attribute | fontVariant Property
Sets or retrieves whether the text of the object is in small capital letters.
Syntax
Possible Values
The property is read/write with a default value of normal; the cascading style sheets
(CSS) attribute is inherited.
Example
The following examples use the font-variant attribute and the fontVariant property
to change the font to small capitals.
This example uses P as a selector in an embedded (global) style sheet to set the font
style to small-caps in all paragraphs.
<P STYLE="font-variant:small-caps">
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to set the font style to small-caps when an
onmousedown event occurs.
<DIV onmousedown="this.style.fontVariant='small-caps'">
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
A, ADDRESS, B, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, currentStyle, custom, DD, DFN, DIR, DIV,
DL, DT, EM, FIELDSET, FORM, Hn, HTML, I, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT
type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING,
MARQUEE, MENU, OL, P, PLAINTEXT, PRE, runtimeStyle, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE, TBODY, TD,
TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP
See Also
font
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
ID Attribute | id Propert... indeterminate Prope
Web Workshop | DHTML, HTML & CSS
ime-mode Attribute | imeMode Property
Sets or retrieves the state of an Input Method Editor (IME).
Syntax
Possible Values
The property is read/write with a default value of auto; the proposed cascading style
sheets (CSS) extension attribute is inherited.
An Input Method Editor (IME) allows users to enter and edit Chinese, Japanese, and
Korean characters. The IME is an essential component for writing Chinese, Japanese,
and Korean scripts. These writing systems have more characters than can be encoded
for a regular keyboard. The IMEs for these languages use sequences of base
characters that describe an individual character or group of characters to enter a larger
set of characters. Base characters can be component letters from Hangul syllables,
phonetic components for Japanese Kanji characters, or various combinations for
Chinese characters.
To compose text with an IME, the user generally uses dictionary lookup and contextual
analysis, especially in languages where homonyms are frequent, as in Japanese. A
user typically starts by entering a few component characters, optionally selecting from
various choices, and a confirmation command.
Inactive mode. The keyboard acts like a regular keyboard and input is limited to
a small set of characters.
Active mode. The IME accepts component characters or processing commands.
HTML authors can provide users with some control by specifying an IME mode for a
specific text entry. For example, if Japanese users enter information in a registration
form, they might be required to enter their names in Kanji and Roman characters. By
default, the users would have to make sure that the IME is inactive when entering their
names in the Latin alphabet. The user would activate the IME to enter Kanji letters,
then deactivate the IME to complete the form in the Latin alphabet. By controlling the
IME mode, the HTML author prevents the user from having to activate and deactivate
the IME.
Example
Applies To
INPUT_text, TEXTAREA
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
lastModified Property layout-grid-char Attribut.
Web Workshop | DHTML, HTML & CSS
layout-grid Attribute | layoutGrid Property
Sets or retrieves the composite document grid properties that specify the layout of text
characters.
Syntax
Possible Values
The property is read/write with no default value; the proposed cascading style sheets
(CSS) extension attribute is inherited.
Web documents in East Asian languages, such as Chinese or Japanese, usually create a
page layout for characters using a one- or two-dimensional grid. You can use the
layout-grid attribute to incorporate this layout into Web documents.
Example
This example uses the layout-grid attribute to specify character layout for a block of
text.
<STYLE>
DIV.layout { layout-grid: char line 12px 12px .5in }
</STYLE>
Applies To
A, ACRONYM, ADDRESS, APPLET, AREA, B, BASE, BASEFONT, BDO, BIG, BLOCKQUOTE, BODY, BR, BUTTON, CAPTION, CENTER, CITE, CODE, COL,
COLGROUP, custom, DD, DEL, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, FRAME, FRAMESET, HEAD, Hn, HR, I, IFRAME, IMG,
INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset,
INPUT type=submit, INPUT type=text, INS, KBD, LABEL, LEGEND, LI, LISTING, MAP, MARQUEE, MENU, META, NEXTID, NOBR, OBJECT, OL,
OPTION, P, PLAINTEXT, PRE, Q, RT, RUBY, runtimeStyle, S, SAMP, SCRIPT, SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE,
TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
layout-grid Attribute | l... layout-grid-char-spac
Web Workshop | DHTML, HTML & CSS
layout-grid-char Attribute | layoutGridChar Property
Sets or retrieves the size of the character grid used for rendering the text content of an
element.
Syntax
Possible Values
The property is read/write with a default value of none; the proposed cascading style
sheets (CSS) extension attribute is inherited.
The visual effects of the layout-grid-char attribute are similar to the lineHeight
property.
Web documents in East Asian languages, such as Chinese or Japanese, usually create a
page layout for characters using a one- or two-dimensional grid. You can use the
layout-grid attribute to incorporate this layout into Web documents.
Note For this property to have an effect, the layout-grid-mode attribute must be set to
line or both.
Example
This example uses the layout-grid-char attribute to specify character layout for a
block of text.
<STYLE>
DIV.layout { layout-grid-char: auto }
</STYLE>
<DIV CLASS = "layout">
This is a block element containing a sentence of sample text.
</DIV>
Applies To
BLOCKQUOTE, BODY, CENTER, currentStyle, DD, DIR, DIV, DL, DT, FIELDSET, FORM, Hn, HR, LI, LISTING, MARQUEE, MENU, OL, P, PLAINTEXT,
PRE, runtimeStyle, style, TABLE, TD, TH, TR, UL, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
layout-grid-char Attribut... layout-grid-line Attr
Web Workshop | DHTML, HTML & CSS
layout-grid-char-spacing Attribute | layoutGridCharSpacing
Property
Sets or retrieves the character spacing used for rendering the text content of an element
with the layout-grid-type attribute set to loose.
Syntax
Possible Values
The property is read/write with a default value of auto; the proposed cascading style
sheets (CSS) extension attribute is inherited.
Web documents in East Asian languages, such as Chinese or Japanese, usually create a
page layout for characters using a one- or two-dimensional grid. You can use the
layout-grid attribute to incorporate this layout into Web documents.
Note For this property to have an effect, the layout-grid-mode attribute must be set to
char or both, and the layout-grid-type attribute must be set to loose.
Example
<STYLE>
DIV.layout { layout-grid-char-spacing: auto }
</STYLE>
<DIV CLASS = "layout">
This is a block element containing a sentence of sample text.
</DIV>
Applies To
BLOCKQUOTE, BODY, CENTER, currentStyle, DD, DIR, DIV, DL, DT, FIELDSET, FORM, Hn, HR, LI, LISTING, MARQUEE, MENU, OL, P, PLAINTEXT,
PRE, runtimeStyle, style, TABLE, TD, TH, TR, UL, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
layout-grid-char-spacing ... layout-grid-mode A
Web Workshop | DHTML, HTML & CSS
layout-grid-line Attribute | layoutGridLine Property
Sets or retrieves the grid line value used for rendering the text content of an element.
Syntax
Possible Values
The property is read/write with a default value of none; the proposed cascading style
sheets (CSS) extension attribute is inherited.
The visual effects of the layout-grid-line attribute are similar to the lineHeight
property.
Web documents in East Asian languages, such as Chinese or Japanese, usually create a
page layout for characters using a one- or two-dimensional grid. You can use the
layout-grid attribute to incorporate this layout into Web documents.
Note For this property to have an effect, the layout-grid-mode attribute must be set to
line or both.
Example
This example uses the layout-grid-line attribute to specify character layout for a
block of text.
<STYLE>
DIV.layout { layout-grid-line: auto }
</STYLE>
Applies To
BLOCKQUOTE, BODY, CENTER, currentStyle, DD, DIR, DIV, DL, DT, FIELDSET, FORM, Hn, HR, LI, LISTING, MARQUEE, MENU, OL, P, PLAINTEXT,
PRE, runtimeStyle, style, TABLE, TD, TH, TR, UL, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
layout-grid-line Attribut... layout-grid-type Attr
Web Workshop | DHTML, HTML & CSS
layout-grid-mode Attribute | layoutGridMode Property
Sets or retrieves whether the text layout grid uses two dimensions.
Syntax
Possible Values
The property is read/write with a default value of both; the proposed cascading style
sheets (CSS) extension attribute is inherited.
Web documents in East Asian languages, such as Chinese or Japanese, usually create a
page layout for characters using a one- or two-dimensional grid. You can use the
layout-grid attribute to incorporate this layout into Web documents.
Example
This example uses the layout-grid-mode attribute to specify character layout for a
block of text.
<STYLE>
DIV.layout { layout-grid-mode: line }
</STYLE>
Applies To
A, ACRONYM, ADDRESS, APPLET, AREA, B, BASE, BASEFONT, BDO, BIG, BLOCKQUOTE, BODY, BR, BUTTON, CAPTION, CENTER, CITE, CODE, COL,
COLGROUP, currentStyle, custom, DD, DEL, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, FRAME, FRAMESET, HEAD, Hn, HR, I,
IFRAME, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT
type=reset, INPUT type=submit, INPUT type=text, INS, KBD, LABEL, LEGEND, LI, LISTING, MAP, MARQUEE, MENU, META, NEXTID, NOBR, OBJECT,
OL, OPTION, P, PLAINTEXT, PRE, Q, RT, RUBY, runtimeStyle, S, SAMP, SCRIPT, SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE,
TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
layout-grid-mode Attribut... left Attribute | left
Web Workshop | DHTML, HTML & CSS
layout-grid-type Attribute | layoutGridType Property
Sets or retrieves the type of grid used for rendering the text content of an element.
Syntax
Possible Values
fixed Grid used for monospaced layout. The layout rules are as follows:
All noncursive characters are treated as equal; every character is centered within a single grid
space by default.
Runs of cursive characters are treated as strips the same way as in a strict grid.
Justification or any other character-width changing behaviors are disabled.
The property is read/write with a default value of loose; the proposed cascading style
sheets (CSS) extension attribute is inherited.
Web documents in East Asian languages, such as Chinese or Japanese, usually create a
page layout for characters using a one- or two-dimensional grid. You can use the
layout-grid attribute to incorporate this layout into Web documents.
Example
This example uses the layout-grid-type attribute to specify character layout for a
block of text.
<STYLE>
DIV.layout { layout-grid-type: strict }
</STYLE>
<DIV CLASS = "layout">
This is a block element containing a sentence of sample text.
</DIV>
Applies To
BLOCKQUOTE, BODY, CENTER, currentStyle, DD, DIR, DIV, DL, DT, FIELDSET, FORM, Hn, HR, LI, LISTING, MARQUEE, MENU, OL, P, PLAINTEXT,
PRE, runtimeStyle, style, TABLE, TD, TH, TR, UL, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
letter-spacing Attribute ... line-height Attribute
Web Workshop | DHTML, HTML & CSS
line-break Attribute | lineBreak Property
Sets or retrieves line-breaking rules for Japanese text.
Syntax
Possible Values
The property is read/write with a default value of normal; the proposed cascading style
sheets (CSS) extension property is inherited.
ADDRESS, BLOCKQUOTE, BODY, CENTER, DD, DIR, DIV, DL, DT, FIELDSET, FORM, Hn, HR, LEGEND, LI, LISTING, MARQUEE, MENU, OL, P,
PLAINTEXT, PRE, TABLE, TD, TH, TR, UL, XMP
See Also
wordBreak
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
line-break Attribute | li... link Pseudo-class D
Web Workshop | DHTML, HTML & CSS
line-height Attribute | lineHeight Property
Sets or retrieves the distance between lines in the object.
Syntax
Possible Values
The property is read/write with a default value of normal; the cascading style sheets
(CSS) attribute is inherited.
Line height is the distance between the descender of the font and the top of the
internal leading of the font. A negative line height is allowed to achieve various
shadowing effects.
If a formatted line contains more than one object, the maximum line height applies. In
this case, negative values are not allowed.
Internet Explorer 3.0 supports the line-height attribute through the font attribute.
Example
The following examples use the line-height attribute and the lineHeight property to
control the height of paragraph lines.
<STYLE>
P { line-height:8mm}
BLOCKQUOTE { line-height:4mm }
</STYLE>
This feature requires Microsoft® Internet Explorer 4.0 or later. Click the icon below to
install the latest version. Then reload this page to view the sample.
This example uses inline scripting to set the distance between lines when an
onmouseover event occurs.
<DIV STYLE="font-size:14"
onmouseover="this.style.lineHeight='6mm'">
:
</DIV>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
A, ADDRESS, B, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, currentStyle, custom, DD, DFN, DIR, DIV,
DL, DT, EM, FIELDSET, FORM, Hn, HTML, I, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT
type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING,
MARQUEE, MENU, OL, P, PLAINTEXT, PRE, runtimeStyle, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE, TBODY, TD,
TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
length Property line-break Attribute | li... DHT
Web Workshop | DHTML, HTML & CSS
letter-spacing Attribute | letterSpacing Property
Sets or retrieves the amount of additional space between letters in the object.
Syntax
Possible Values
The property is read/write with a default value of normal; the cascading style sheets
(CSS) attribute is inherited.
When specified as a positive length value, the letter-spacing attribute adds the
specified value to the default spacing between characters within an element. A
negative length value decreases the space between characters. Letter spacing can be
influenced by justification.
Example
The following examples use the letter-spacing attribute and the letterSpacing
property to change the space between letters.
<STYLE>
BLOCKQUOTE { letter-spacing:-0.2mm }
</STYLE>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to set the spacing to 1 millimeter when an
onmouseover event occurs.
<DIV STYLE="font-size:14"
onmouseover="this.style.letterSpacing='1mm'">
:
</DIV>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
A, ADDRESS, B, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, currentStyle, custom, DD, DFN, DIR, DIV,
DL, DT, EM, FIELDSET, FORM, Hn, HTML, I, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT
type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING,
MARQUEE, MENU, OL, P, PLAINTEXT, PRE, runtimeStyle, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE, TBODY, TD,
TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
ROWSPAN Attribute | rowSp... ruby-overhang A
Web Workshop | DHTML, HTML & CSS
ruby-align Attribute | rubyAlign Property
Sets or retrieves the position of the ruby text specified by the RT object.
Syntax
Possible Values
The property is read/write with a default value of auto; the proposed cascading style
sheets (CSS) extension attribute is not inherited.
The rubyAlign property specifies the alignment of the ruby text defined by the RT
object, and is set on the RUBY object.
Example
This example uses the ruby-align attribute and the rubyAlign property to set the
alignment of the ruby text. It uses an inline style sheet to set the ruby-align attribute
to right.
This feature requires Internet Explorer 5 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
RUBY
See Also
rubyPosition, rubyOverhang
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
ruby-align Attribute | ru... ruby-position Attribu
Web Workshop | DHTML, HTML & CSS
ruby-overhang Attribute | rubyOverhang Property
Sets or retrieves the position of the ruby text specified by the RT object.
Syntax
Possible Values
The property is read/write with a default value of auto; the proposed cascading style
sheets (CSS) extension attribute is not inherited.
The rubyOverhang property specifies the overhang of the ruby text defined by the RT
object, and is set on the RUBY object.
Example
This example uses the ruby-overhang attribute and the rubyOverhang property to
set the overhang of the ruby text. It uses an inline style sheet to set the ruby-
overhang attribute to none.
This feature requires Internet Explorer 5 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
RUBY
See Also
rubyAlign, rubyPosition
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
ruby-overhang Attribute |... RULES Attribute |
Web Workshop | DHTML, HTML & CSS
ruby-position Attribute | rubyPosition Property
Sets or retrieves the position of the ruby text specified by the RT object.
Syntax
Possible Values
The property is read/write with a default value of above; the proposed cascading style
sheets (CSS) extension attribute is not inherited.
The rubyPosition property specifies the position of the ruby text defined by the RT
object, and is set on the RUBY object.
Example
This example uses the ruby-position attribute and the rubyPosition property to set
the position of the ruby text. It uses an inline style sheet to set the ruby-position
attribute to inline.
This feature requires Internet Explorer 5 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
RUBY
See Also
rubyAlign, rubyOverhang
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
text Property text-autospace Attribute ... DHT
Web Workshop | DHTML, HTML & CSS
text-align Attribute | textAlign Property
Sets or retrieves whether the text in the object is left-aligned, right-aligned, centered, or
justified.
Syntax
Possible Values
The property is read/write with a default value of left; the cascading style sheets
(CSS) attribute is inherited.
Because this property is inherited, all block-level objects inside a DIV object having
textAlign=center are centered.
Example
This examples uses the text-align attribute and the textAlign property to align text
within the object.
This example uses P as a selector and two classes to call an embedded style sheet that
aligns the text according to the respective rule.
<STYLE>
P { text-align:center }
.align1 { text-align:right }
.align2 { text-align:justify }
</STYLE>
</HEAD>
<BODY>
<P onclick= "this.className='align1'"
ondblclick="this.className='align2'">
. . . </P>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to change the alignment of the text when an
onmouseover event occurs.
<P STYLE="font-size:14"
onmouseover="this.style.textAlign='center'">
. . . </P>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
BLOCKQUOTE, BODY, CENTER, currentStyle, DD, DIR, DIV, DL, DT, FIELDSET, FORM, Hn, HR, INPUT type=password, INPUT type=text, LI,
LISTING, MARQUEE, MENU, OL, P, PLAINTEXT, PRE, runtimeStyle, style, TABLE, TD, TEXTAREA, TH, TR, UL, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
text-autospace Attribute ... textDecorationBlink
Web Workshop | DHTML, HTML & CSS
text-decoration Attribute | textDecoration Property
Sets or retrieves whether the text in the object has blink, line-through, overline, or
underline decorations.
Syntax
Possible Values
The property is read/write with a default value of none (see the Remarks section); the
cascading style sheets (CSS) attribute is not inherited.
Default value is underline for A when used with href, U, and INS.
Default value is line-through for STRIKE, S, and DEL.
If the value none is placed at the end of the values, all values are cleared. For
example, setting {text-decoration: underline overline blink none} causes none of
the decorations to render.
If the object has no text (for example, the IMG object in HTML) or is an empty object
(for example, "<EM> </EM>"), this property has no effect.
If you set the text-decoration attribute to none on the BODY object, the A objects
are still underlined. To remove the underline from the A objects, either set the style
inline or use A as a selector in the global style sheet.
Specifying the textDecoration property for block elements affects all inline children.
If it is specified for, or affects, an inline element, it affects all boxes generated by the
element.
The overline and blink possible values are available as of Internet Explorer 4.0.
Although blink is exposed, it is not rendered.
Example
The following examples use the text-decoration attribute and the textDecoration
property to decorate text within the object.
This example uses an inline style sheet to draw a line through the text within the
object.
<DIV STYLE="text-decoration:line-through">
:
</DIV>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to underline the text within the SPAN object when
the user moves the mouse over the SPAN.
<SPAN STYLE="font-size:14"
onmouseover=this.style.textDecoration="underline"
:
</SPAN>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
A, ADDRESS, B, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, currentStyle, custom, DD, DFN, DIR, DIV,
DL, DT, EM, FIELDSET, FORM, Hn, HTML, I, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT
type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING,
MARQUEE, MENU, OL, P, PLAINTEXT, PRE, runtimeStyle, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE, TBODY, TD,
TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
text-indent Attribute | t... text-transform Attrib
Web Workshop | DHTML, HTML & CSS
text-justify Attribute | textJustify Property
Sets or retrieves the type of alignment used to justify text in the object.
Syntax
Possible Values
The property is read/write with a default value of auto; the proposed cascading style
sheets (CSS) extension attribute is not inherited.
For this property to affect text layout, the text-align property must be set to justify.
Applies To
ADDRESS, BLOCKQUOTE, BODY, CENTER, DD, DIR, DIV, DL, DT, FIELDSET, FORM, Hn, HR, LEGEND, LI, LISTING, MARQUEE, MENU, OL, P,
PLAINTEXT, PRE, TABLE, TD, TH, TR, UL, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
textDecorationUnderline P... text-justify Attribu
Web Workshop | DHTML, HTML & CSS
text-indent Attribute | textIndent Property
Sets or retrieves the indentation of the text in the object.
Syntax
Possible Values
The property is read/write with a default value of 0; the cascading style sheets (CSS)
attribute is inherited.
The property can be negative. An indent is not inserted in the middle of an object that
was broken by another object (such as BR in HTML).
Example
The following examples use the text-indent attribute and the textIndent property to
indent the object's text.
This example uses calls to an embedded style sheet to change the indent on the text
when an onclick event occurs. The text was originally indented 2 centimeters using DIV
as a selector in the style sheet.
<STYLE>
DIV { text-indent:2cm }
.click1 { text-indent:50% }
.click2 { text-indent: }
</STYLE>
</HEAD>
<BODY>
<DIV onclick="this.className='click1'"
ondblclick="this.className='click2'">
. . . </DIV>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to indent the text within the DIV when an
onmouseover event occurs.
<DIV onmouseover=this.style.textIndent="2cm"
:
</DIV>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
BLOCKQUOTE, BODY, BUTTON, CENTER, currentStyle, DD, DFN, DIR, DIV, DL, DT, FIELDSET, FORM, Hn, HR, ISINDEX, LI, LISTING, MARQUEE,
MENU, OL, P, PLAINTEXT, PRE, runtimeStyle, style, TABLE, TD, TH, TR, UL, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
text-justify Attribute | ... tFoot Property DHTM
Web Workshop | DHTML, HTML & CSS
text-transform Attribute | textTransform Property
Sets or retrieves the rendering of the text in the object.
Syntax
Possible Values
The property is read/write with a default value of none; the cascading style sheets
(CSS) attribute is inherited.
The following examples use the text-transform attribute and the textTransform
property to transform a block of text from lower case to upper case when the user
moves the mouse over the text. The text transforms back to lower case when the user
clicks the text.
This example uses three calls to an embedded (global) style sheet to transform the
text.
<STYLE>
.transform1 { text-transform:uppercase }
.transform2 { text-transform:lowercase }
.transform3 { text-transform:none }
</STYLE>
</HEAD>
<BODY>
<DIV STYLE="font-size:14"
onmouseover="this.className='transform1'"
onclick= "this.className='transform2'"
ondblclick="this.className='transform3'">
:
</DIV>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to transform the text when different mouse events
occur.
<DIV STYLE="font-size:14"
onmouseover="this.style.textTransform='uppercase'"
onmouseout="this.style.textTransform='lowercase'"
onclick="this.style.textTransform='none'">
:
</DIV>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
A, ADDRESS, B, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, currentStyle, custom, DD, DFN, DIR, DIV,
DL, DT, EM, FIELDSET, FORM, Hn, HTML, I, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT
type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING,
MARQUEE, MENU, OL, P, PLAINTEXT, PRE, runtimeStyle, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE, TBODY, TD,
TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
TYPE Attribute | type Pro... uniqueID Property
Web Workshop | DHTML, HTML & CSS
unicode-bidi Attribute | unicodeBidi Property
Sets or retrieves the level of embedding with respect to the bidirectional algorithm.
Syntax
HTML { unicode-bidi:sEmbedLevel }
Scripting object.unicodeBidi [ = sEmbedLevel ]
Possible Values
The property is read/write with a default value of normal; the cascading style sheets
(CSS) attribute is inherited.
Remarks
Applies To
A, ACRONYM, ADDRESS, AREA, B, BDO, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, currentStyle,
custom, DD, DEL, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, Hn, I, IMG, INPUT type=button, INPUT type=checkbox, INPUT
type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, INS, KBD,
LABEL, LEGEND, LI, LISTING, MAP, MARQUEE, MENU, NOBR, OBJECT, OL, OPTION, P, PLAINTEXT, PRE, Q, RT, RUBY, runtimeStyle, S, SAMP,
SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
VCARD_NAME Attribute | vc... visibility Attribut
Web Workshop | DHTML, HTML & CSS
vertical-align Attribute | verticalAlign Property
Sets or retrieves the vertical positioning of the object.
Syntax
Possible Values
The property is read/write with a default value of baseline; the cascading style sheets
(CSS) attribute is not inherited.
The values sub and super are supported on text. The other values are supported for
objects that support VALIGN.
Example
This example uses of the verticalAlign property to align text within a table cell.
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
COL, currentStyle, custom, IMG, runtimeStyle, SPAN, style, TBODY, TD, TFOOT, TH, THEAD, TR
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
width Attribute | width P... word-spacing Attribu
Web Workshop | DHTML, HTML & CSS
word-break Attribute | wordBreak Property
Sets or retrieves line-breaking behavior within words, particularly where multiple
languages appear in the object.
Syntax
HTML { word-break:sBreak }
Scripting object.style.wordBreak [ = sBreak ]
Possible Values
The property is read/write with a default value of normal; the proposed cascading style
sheets (CSS) extension attribute is inherited.
ADDRESS, BLOCKQUOTE, BODY, CENTER, DD, DIR, DIV, DL, DT, FIELDSET, FORM, Hn, HR, LEGEND, LI, LISTING, MARQUEE, MENU, OL, P,
PLAINTEXT, PRE, TABLE, TD, TH, TR, UL, XMP
See Also
lineBreak
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
word-break Attribute | wo... WRAP Attribute | w
Web Workshop | DHTML, HTML & CSS
word-spacing Attribute | wordSpacing Property
Sets or retrieves the amount of additional space between words in the object.
Syntax
Possible Values
The property is read/write with a default value of normal; the cascading style sheets
(CSS) attribute is inherited.
The attribute adds the specified spacing after each word. Justification can influence
word spacing.
The length value indicates an addition to the default space between words. Negative
values are permitted.
Example
This example uses the word-spacing attribute and the wordSpacing property to
increase the amount of space between words in a SPAN.
<STYLE>
SPAN.spacing{word-spacing: 10;}
</STYLE>
<SCRIPT>
function fnChangeSpace(){
oSpan.style.wordSpacing =
oSelSpace.options[oSelSpace.selectedIndex].text;
}
</SCRIPT>
<SELECT ID = "oSelSpace" onchange = "fnChangeSpace()">
<OPTION>10
<OPTION>15
<OPTION>20
</SELECT>
<SPAN ID = "oSpan" CLASS = "spacing">
The quick brown fox jumped over the lazy dog.
</SPAN>
Applies To
A, ADDRESS, B, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, custom, DD, DFN, DIR, DIV, DL, DT, EM,
FIELDSET, FORM, Hn, HTML, I, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password,
INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, OL, P,
PLAINTEXT, PRE, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL,
VAR, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
availWidth Property BACKGROUND Attribute | b
Web Workshop | DHTML, HTML & CSS
background Attribute | background Property
Sets or retrieves up to five separate background properties of the object.
Syntax
Possible Values
sBackground String that specifies up to five of the following space-delimited values, in any order:
color Any of the range of color values available to the backgroundColor property.
image Any of the range of image values available to the backgroundImage property.
repeat Any of the range of repeat values available to the backgroundRepeat property.
attachment Any of the range of attachment values available to the backgroundAttachment property.
position Any of the range of position values available to the backgroundPosition property.
The property is read/write with a default value of transparent none repeat scroll
0% 0%. The cascading style sheets (CSS) attribute is not inherited.
Individual background properties not set by the composite background property are
set to their default values. For example, the default value for image is none. Setting
background: white is equivalent to setting background: white none repeat scroll
0% 0%. So, in addition to setting the background color to white, setting background:
white clears any image, repeat, attachment, or position values previously set.
The background properties render in the object's content and padding; however,
borders are set using the border properties.
In Microsoft® Internet Explorer 3.0, elements that expose the background property
only support the color and image values; the attachment value is only supported by
the BODY, TABLE, and TD elements. In block elements, such as P and DIV, background
images and colors appear only behind text in Internet Explorer 3.0; in Internet
Explorer 4.0 and later, backgrounds stretch from margin to margin when used with
block elements.
Although objects do not inherit the background property, the background image or
color of an object's parent appears behind an object if a background is not specified.
For more information about supported colors, see the Color Table.
Example
The following examples use the background property and the background attribute
to set the background values.
This example uses inline event handlers to modify the background-color and
background-position attributes of an image. These attributes are specified in an
embedded style sheet using the background attribute.
<STYLE>
.style1{background:beige url(sphere.jpg) no-repeat top center}
.style2{background:ivory url(sphere.jpeg) no-repeat bottom
right}
</STYLE>
</HEAD>
<BODY>
<SPAN onmouseover="this.className='style1'"
onmouseout="this.className='style2'">
. . . </SPAN>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
A, ADDRESS, B, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, custom, DD, DFN, DIR, DIV, DL, DT, EM,
FIELDSET, FORM, Hn, HTML, I, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password,
INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, OL, P,
PLAINTEXT, PRE, runtimeStyle, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH,
THEAD, TR, TT, U, UL, VAR, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
BACKGROUND Attribute | ba... background-colo
Web Workshop | DHTML, HTML & CSS
background-attachment Attribute | backgroundAttachment
Property
Sets or retrieves how the background image is attached to the object within the document.
Syntax
Possible Values
The property is read/write with a default value of scroll; the cascading style sheets
(CSS) attribute is not inherited.
This property can be set with the other background properties by using the
background composite property.
Example
This example uses an inline style sheet to set the background to fixed.
<STYLE >
BODY { background-attachment:fixed }
</STYLE>
</HEAD>
<BODY background="some.jpg">
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
background-attachment Att... background-imag
Web Workshop | DHTML, HTML & CSS
background-color Attribute | backgroundColor Property
Sets or retrieves the color behind the content of the object.
Syntax
Possible Values
The property is read/write with a default value of transparent; the cascading style
sheets (CSS) attribute is not inherited.
This property can be set with the other background properties by using the
background composite property.
Internet Explorer 3.0 supports the background-color attribute, but only when it's set
by using the background attribute.
Windows CE
Example
This example uses an inline style sheet to set the background color to beige.
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to set the background color to beige.
<SPAN onmouseover="this.style.backgroundColor='beige'">
. . . </SPAN>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
A, ADDRESS, B, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, currentStyle, custom, DD, DFN, DIR, DIV,
DL, DT, EM, FIELDSET, FORM, Hn, HTML, I, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT
type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING,
MARQUEE, MENU, OL, OPTION, P, PLAINTEXT, PRE, runtimeStyle, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE,
TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
background-color Attribut... background-positio
Web Workshop | DHTML, HTML & CSS
background-image Attribute | backgroundImage Property
Sets or retrieves the background image of the object.
Syntax
Possible Values
The property is read/write with a default value of none; the cascading style sheets
(CSS) attribute is not inherited.
The URL identifies the image file. When setting a background image, you can set a
background color to be used when the image is unavailable. When the image is
available, it overlays the background color.
This property may be set with other background properties by using the background
composite property.
Internet Explorer 3.0 supports the background-image attribute, but only when it's
set through the background attribute.
Example
This example uses a call to an embedded (global) style sheet to show and hide the
background image.
<STYLE>
.setUrl { background-image: url(sphere.jpg) }
.loseUrl { background-image: url(none) }
</STYLE>
</HEAD>
<BODY>
<SPAN STYLE="font-size:14" onmouseover="this.className='setUrl'"
onmouseout="this.className='loseUrl'">
. . . </SPAN>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to show and hide the background image.
<SPAN
onmouseover="this.style.backgroundImage='url(sphere.jpeg)'">
. . . </SPAN>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
A, ADDRESS, B, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, currentStyle, custom, DD, DFN, DIR, DIV,
DL, DT, EM, FIELDSET, FORM, Hn, HTML, I, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT
type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING,
MARQUEE, MENU, OL, P, PLAINTEXT, PRE, runtimeStyle, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE, TBODY, TD,
TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
background-image Attribut... backgroundPositio
Web Workshop | DHTML, HTML & CSS
background-position Attribute | backgroundPosition Property
Sets or retrieves the position of the background of the element.
Syntax
Possible Values
The property is read/write with a default value of 0% 0%; the cascading style sheets
(CSS) attribute is not inherited.
If only one value is set, that value applies to the horizontal coordinate, and the vertical
is set to 50%. If both values are set, the first value applies to the horizontal coordinate
and the second value applies to the vertical.
Setting the values to 0% 0% positions the background-image to the upper left corner of
the element's content excluding the padding.
Specifying right center has the following effect: Because right is assumed to be an
x-coordinate direction, right will overwrite the center value; the background shifts
right accordingly.
This property may be set together with the other background properties using the
background composite property.
Example
The following examples use the background-position attribute and the
backgroundPosition property to specify the position of a background image.
This example uses a call to an embedded (global) style sheet to move the sphere.
<STYLE>
.style1 { background-position:top center }
.style2 { background-position:bottom right }
</STYLE>
</HEAD>
<BODY onload="oSpan.className='style1'">
<SPAN STYLE="font-size:14; width:250;" ID="oSpan"
onmouseover="this.className='style2'"
onmouseout="this.className='style1'">
. . . </SPAN>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
<SPAN onmouseover="this.style.backgroundPosition='bottom
right'">
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
A, ADDRESS, B, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, custom, DD, DFN, DIR, DIV, DL, DT, EM,
FIELDSET, FORM, Hn, HTML, I, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password,
INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, OL, P,
PLAINTEXT, PRE, runtimeStyle, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH,
THEAD, TR, TT, U, UL, VAR, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
backgroundPositionY Prope... BALANCE Attribut
Web Workshop | DHTML, HTML & CSS
background-repeat Attribute | backgroundRepeat Property
Sets or retrieves how the backgroundImage property of the object is tiled.
Syntax
Possible Values
The property is read/write with a default value of repeat; the cascading style sheets
(CSS) attribute is not inherited.
The repeat-x and repeat-y values make the image repeat horizontally and vertically,
respectively, creating a single band of images from one side to the other.
This property can be set with other background properties by using the background
composite property.
Example
This example uses a call to an embedded (global) style sheet to tile the image.
<STYLE>
.style1 { background-image:url(sphere.jpg);
background-repeat:repeat }
.style2 { background-image:url(sphere.jpeg);
background-repeat:no-repeat }
</STYLE>
</HEAD>
<BODY>
<SPAN onmouseover="this.className='style1'"
onmouseout="this.className='style2'"
onclick="this.className=''">
. . . </SPAN>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example shows how to use inline scripting to tile the image.
<SPAN
onmouseover="this.style.backgroundImage='url(sphere.jpeg)';
this.style.backgroundRepeat='repeat'">
:
</SPAN>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
A, ADDRESS, B, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, currentStyle, custom, DD, DFN, DIR, DIV,
DL, DT, EM, FIELDSET, FORM, Hn, HTML, I, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT
type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING,
MARQUEE, MENU, OL, P, PLAINTEXT, PRE, runtimeStyle, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE, TBODY, TD,
TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
COLOR Attribute | color P... colorDepth Property
Web Workshop | DHTML, HTML & CSS
color Attribute | color Property
Sets or retrieves the color of the text of the object.
Syntax
Possible Values
sColor String that specifies one of the color names or red-green-blue (RGB) values in the Color Table.
The property is read/write with no default value; the cascading style sheets (CSS)
attribute is inherited.
Some browsers do not recognize color names, but all browsers should recognize red-
green-blue (RGB) color values and display them correctly.
Windows CE
In Microsoft® Windows® CE, specifying a value for the color property of the OPTION
element when applied through the style object has no effect.
Example
The following examples use the color attribute and the color property to change the
text color of an object.
This example uses a call to an embedded (global) style sheet to change the text color
to red when an onmouseover event occurs.
<STYLE>
.color1 { color:red }
.color2 { color: }
</STYLE>
</HEAD>
<BODY>
<SPAN STYLE="font-size:14" onmouseover="this.className='color1'"
onmouseout="this.className='color2'"> . . .
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to change the text color to red when an
onmouseover event occurs.
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
A, ADDRESS, APPLET, B, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, currentStyle, custom, DD, DFN,
DIR, DIV, DL, DT, EM, FIELDSET, FORM, Hn, HTML, I, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT
type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING,
MARQUEE, MENU, OL, OPTION, P, PLAINTEXT, PRE, runtimeStyle, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE,
TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
BGPROPERTIES Attribute | ... BORDER Attribute
Web Workshop | DHTML, HTML & CSS
border Attribute | border Property
Sets or retrieves the properties to be drawn around the object.
Syntax
Possible Values
sBorder String that specifies one or more of the following space-delimited values:
width Any of the range of width values available to the borderWidth property.
style Any of the range of style values available to the borderStyle property.
color Any of the range of color values available to the borderColor property.
The property is read/write with a default value of medium none; the cascading style
sheets (CSS) attribute is not inherited.
The border property is a composite property that sets the width, style, and color
values for all four sides of an object.
You must specify a style when specifying a width and/or color; otherwise, the border
does not render.
All individual border properties not set by the composite border property are set to
their default values. For example, the default value for width is medium.
The setting border=thin is identical to border=thin none; the default value for the
border color is the same as the text color if one is not initially set. So, not only does
the property set width to thin, it also clears any style or color values previously set.
To use this property, inline elements must have an absolute position or layout.
Element layout is set by providing a value for the height property or the width
property.
For more information about supported colors, see the Color Table.
Example
The following examples use the border attribute and the border property to specify
the composite border properties.
This example uses a call to an embedded (global) style sheet to modify the border
attribute.
<HEAD>
<STYLE>
.applyBorder { border:0.2cm groove orange }
.removeBorder { border:none }
</STYLE>
</HEAD>
<BODY>
<TABLE BORDER>
<TR>
<TD onmouseover="this.className='applyBorder'"
onmouseout="this.className='removeBorder'">
<IMG src="sphere.jpg"></TD>
</TR>
</TABLE>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, custom, DD, DIR, DIV, DL, DT, EMBED, FIELDSET, FORM, Hn, IFRAME, IMG, INPUT
type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT
type=submit, INPUT type=text, ISINDEX, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, runtimeStyle, SPAN, style, TABLE, TD,
TEXTAREA, TH, UL, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
BORDER Attribute | border... border-bottom-co
Web Workshop | DHTML, HTML & CSS
border-bottom Attribute | borderBottom Property
Sets or retrieves the properties of the bottom border of the object.
Syntax
Possible Values
sBottom String that specifies one or more of the following space-delimited values:
width Any of the range of width values available to the borderBottomWidth property.
style Any of the range of style values available to the borderBottomStyle property.
color Any of the range of color values available to the borderBottomColor property.
The property is read/write with a default value of medium none; the cascading style
sheets (CSS) attribute is not inherited.
The borderBottom property is a composite property that sets the width, color, and
style values for the bottom border of an object.
All individual border properties not set by the composite borderBottom property are
set to their default values. For example, the default value for width is medium.
To use this property, inline elements must have an absolute position or layout.
Element layout is set by providing a value for the height property or the width
property.
For more information about supported colors, see the Color Table.
Example
The following examples use the borderBottom property and the border-bottom
attribute to specify the various properties for the bottom border.
This example uses a call to an embedded (global) style sheet to change the attributes
of the bottom border.
<HEAD>
<STYLE>
TD { border-bottom:0.5cm solid yellow }
.change { border-bottom:0.5cm groove pink }
</STYLE>
</HEAD>
<BODY>
<TABLE>
<TR>
<TD onmouseover="this.className='change'"
onmouseout="this.className=''"><IMG src="sphere.jpg"></TD>
</TR>
</TABLE>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, custom, DD, DIR, DIV, DL, DT, EMBED, FIELDSET, FORM, Hn, HR, IFRAME, IMG, INPUT
type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT
type=submit, INPUT type=text, ISINDEX, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, runtimeStyle, SPAN, style, TABLE, TD,
TEXTAREA, TH, UL, XMP
See Also
border
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
border-bottom Attribute |... border-bottom-sty
Web Workshop | DHTML, HTML & CSS
border-bottom-color Attribute | borderBottomColor Property
Sets or retrieves the color of the bottom border of the object.
Syntax
Possible Values
sColor String that specifies one of the color names or red-green-blue (RGB) values in the Color Table.
The property is read/write with a default value equal to the value of the color property;
the cascading style sheets (CSS) attribute is not inherited.
To use this property, inline elements must have an absolute position or layout.
Element layout is set by providing a value for the height property or the width
property.
Some browsers do not recognize color names, but all browsers should recognize RGB
color values and display them correctly.
Example
This example uses a call to an embedded (global) style sheet to change the color of
the bottom border.
<HEAD>
<STYLE>
TD { border-bottom-color: red;
border-width: 0.5cm; border-style: groove}
.blue { border-bottom-color: blue}
</STYLE>
</HEAD>
<BODY>
<TABLE BORDER>
<TR>
TD onmouseover="this.className='blue'"
onmouseout="this.className=''">
<IMG src="sphere.jpg">
</TD>
</TR>
</TABLE>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to change the color of the bottom border.
<TD onmouseover="this.style.borderWidth='0.5cm';
this.style.borderBottomColor='blue'">
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, currentStyle, custom, DD, DIR, DIV, DL, DT, EMBED, FIELDSET, FORM, Hn, HR, IFRAME, IMG,
INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset,
INPUT type=submit, INPUT type=text, ISINDEX, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, runtimeStyle, SPAN, style, TABLE,
TD, TEXTAREA, TH, UL, XMP
See Also
currentStyle, border
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
border-bottom-color Attri... border-bottom-wid
Web Workshop | DHTML, HTML & CSS
border-bottom-style Attribute | borderBottomStyle Property
Sets or retrieves the style of the bottom border of the object.
Syntax
Possible Values
The property is read/write with a default value of none; the cascading style sheets
(CSS) attribute is not inherited.
To use this property, inline elements must have an absolute position or layout.
Element layout is set by providing a value for the height property or the width
property.
Example
This example uses a call to an embedded style sheet to change the style of the bottom
border to groove.
<HEAD>
<STYLE>
TD { border-bottom-style:solid;
border-width=0.3cm }
.change { border-bottom-style:groove}
</STYLE>
</HEAD>
<BODY>
<TABLE BORDER>
<TR>
<TD onmouseover="this.className='change'"
onmouseout="this.className=''">
<IMG src="sphere.jpg">
</TD>
</TR>
</TABLE>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to change the style of the bottom border to groove.
<TD onmouseover="this.style.borderWidth='0.5cm';
this.style.borderBottomStyle='groove'">
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, currentStyle, custom, DD, DIR, DIV, DL, DT, EMBED, FIELDSET, FORM, Hn, HR, IFRAME, IMG,
INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset,
INPUT type=submit, INPUT type=text, ISINDEX, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, runtimeStyle, SPAN, style, TABLE,
TD, TEXTAREA, TH, UL, XMP
See Also
border
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
border-bottom-style Attri... border-collapse Att
Web Workshop | DHTML, HTML & CSS
border-bottom-width Attribute | borderBottomWidth Property
Sets or retrieves the width of the bottom border of the object.
Syntax
Possible Values
The property is read/write with a default value of medium; the cascading style sheets
(CSS) attribute is not inherited.
To use this property, inline elements must either have an absolute position or layout.
Element layout is set by providing a value for the height property or the width
property.
Example
This example uses a call to an embedded (global) style sheet to change the width of
the bottom border to 1 centimeter when a mouse click occurs.
<HEAD>
<STYLE>
TD { border-bottom-width:3mm }
.changeborder1 { border-bottom-width:1cm }
</STYLE>
</HEAD>
<BODY>
<TABLE BORDER>
<TR>
<TD onclick="this.className='changeborder1'"
ondblclick="this.className=''">
<IMG src="sphere.jpg">
</TD>
</TR>
</TABLE>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to change the width of the bottom border to 1
centimeter when a mouse click occurs.
<TD onclick="this.style.borderBottomWidth='1cm'">
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, currentStyle, custom, DD, DIR, DIV, DL, DT, EMBED, FIELDSET, FORM, Hn, HR, IFRAME, IMG,
INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset,
INPUT type=submit, INPUT type=text, ISINDEX, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, runtimeStyle, SPAN, style, TABLE,
TD, TEXTAREA, TH, UL, XMP
See Also
border
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
border-bottom-width Attri... border-color Attrib
Web Workshop | DHTML, HTML & CSS
border-collapse Attribute | borderCollapse Property
Sets or retrieves a value indicating whether the row and cell borders of a table are joined
into a single border or detached as in standard HTML.
Syntax
Possible Values
The property is read/write with a default value of separate; the cascading style sheets
(CSS) attribute is not inherited.
This example demonstrates how to use the border-collapse attribute and the
borderCollapse property to manipulate the border on a table.
<P>
<INPUT TYPE=button
onclick="oTable.style.borderCollapse='separate'"
VALUE="separate">
<INPUT TYPE=button
onclick="oTable.style.borderCollapse='collapse'"
VALUE="collapse">
This feature requires Internet Explorer 5 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
TABLE
See Also
border
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
border-collapse Attribute... BORDERCOLOR Attr
Web Workshop | DHTML, HTML & CSS
border-color Attribute | borderColor Property
Sets or retrieves the border color of the object.
Syntax
Possible Values
sColor String that specifies up to four color names or red-green-blue (RGB) values in the Color Table.
The property is read/write with a default value equal to the value of the color property;
the cascading style sheets (CSS) attribute is not inherited.
Up to four different colors can be specified in the following order: top, right, bottom,
left. If one color is supplied, it is used for all four sides. If two colors are supplied, the
first is used for the top and bottom, and the second is used for left and right. If three
colors are supplied, they are used for top, right and left, and bottom, respectively.
To use this property, inline elements must have an absolute position or layout.
Element layout is set by providing a value for the height property or the width
property.
The borderColor property does not render if the borderStyle property is set to none.
Some browsers do not recognize color names, but all browsers should recognize RGB
color values and display them correctly.
Example
The following examples use the border-color attribute and the borderColor property
to specify the border color.
This example uses a call to an embedded (global) style sheet to change the color of
the border to blue from an initial value of red when the mouse moves over the image.
<HEAD>
<STYLE>
TD { border-color: red; border-width: 0.5cm }
.blue { border-color: blue }
</STYLE>
</HEAD>
<BODY>
<TABLE BORDER>
<TR>
<TD onmouseover="this.className='blue'"
onmouseout="this.className=''">
<IMG src="sphere.jpg">
</TD>
</TR>
</TABLE>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to change the color of the border to blue when the
mouse moves over the image.
<TD onmouseover="this.style.borderWidth='0.5cm';
this.style.borderColor='blue';
this.style.borderStyle='solid'">
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, currentStyle, custom, DD, DIR, DIV, DL, DT, EMBED, FIELDSET, FORM, Hn, HR, IFRAME, IMG,
INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset,
INPUT type=submit, INPUT type=text, ISINDEX, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, runtimeStyle, SPAN, style, TABLE,
TD, TEXTAREA, TH, UL, XMP
See Also
border
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
borderColorLight Property border-left-color Attr
Web Workshop | DHTML, HTML & CSS
border-left Attribute | borderLeft Property
Sets or retrieves the properties of the left border of the object.
Syntax
Possible Values
sLeft String that specifies one or more of the following space-delimited values:
width Any of the range of width values available to the borderLeftWidth property.
style Any of the range of style values available to the borderLeftStyle property.
color Any of the range of color values available to the borderLeftColor property.
The property is read/write with a default value of medium none; the cascading style
sheets (CSS) attribute is not inherited.
The borderLeft property is a composite property that sets the width, color, and style
values for the left border of an object.
All individual border properties not set by the composite borderLeft property are set
to their default values. For example, the default value for width is medium.
For more information about supported colors, see the Color Table.
To use this property, inline elements must have an absolute position or layout.
Element layout is set by providing a value for the height property or the width
property.
Example
The following examples use the borderLeft property and the border-left attribute to
specify the composite border-left properties.
This example uses a call to an embedded (global) style sheet to modify the attributes
of the left border.
<HEAD>
<STYLE>
TD { border-left:0.5cm solid yellow }
.change { border-left:0.5cm groove pink }
</STYLE>
</HEAD>
<BODY>
<TABLE>
<TR>
<TD onmouseover="this.className='change'"
onmouseout="this.className=''">
<IMG src="sphere.jpg">
</TD>
</TR>
</TABLE>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to change the properties of the left border.
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, custom, DD, DIR, DIV, DL, DT, EMBED, FIELDSET, FORM, Hn, HR, IFRAME, IMG, INPUT
type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT
type=submit, INPUT type=text, ISINDEX, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, runtimeStyle, SPAN, style, TABLE, TD,
TEXTAREA, TH, UL, XMP
See Also
border
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
border-left Attribute | b... border-left-style Attr
Web Workshop | DHTML, HTML & CSS
border-left-color Attribute | borderLeftColor Property
Sets or retrieves the color of the left border of the object.
Syntax
Possible Values
sColor String that specifies one of the color names or red-green-blue (RGB) values in the Color Table.
The property is read/write with a default value equal to the value of the color property;
the cascading style sheets (CSS) attribute is not inherited.
To use this property, inline elements must have an absolute position or layout.
Element layout is set by providing a value for the height property or the width
property.
Some browsers do not recognize color names, but all browsers should recognize RGB
color values and display them correctly.
Example
The following examples use the border-left-color attribute and the borderLeftColor
property to specify the color of the left border.
This example uses a call to an embedded (global) style sheet to change the color of
the left border from red to blue when an onmouseover event occurs.
<HEAD>
<STYLE>
TD { border-left-color: red;
border-width: 0.5cm; border-style: groove}
.blue { border-left-color: blue}
</STYLE>
</HEAD>
<BODY>
<TABLE BORDER>
<TR>
<TD onmouseover="this.className='blue'"
onmouseout="this.className=''">
<IMG src="sphere.jpg">
</TD>
</TR>
</TABLE>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to change the color of the left border from red to
blue when an onmouseover event occurs.
<TD onmouseover="this.style.borderWidth='0.5cm';
this.style.borderLeftColor='blue'">
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, currentStyle, custom, DD, DIR, DIV, DL, DT, EMBED, FIELDSET, FORM, Hn, HR, IFRAME, IMG,
INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset,
INPUT type=submit, INPUT type=text, ISINDEX, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, runtimeStyle, SPAN, style, TABLE,
TD, TEXTAREA, TH, UL, XMP
See Also
border
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
border-left-color Attribu... border-left-width Att
Web Workshop | DHTML, HTML & CSS
border-left-style Attribute | borderLeftStyle Property
Sets or retrieves the style of the left border of the object.
Syntax
Possible Values
The property is read/write with a default value of none; the cascading style sheets
(CSS) attribute is not inherited.
Inline elements must have an absolute position or layout to use this property.
Element layout is set by providing a value for the height property or the width
property.
Example
The following examples use the border-left-style attribute and the borderLeftStyle
property to specify the style of the left border.
This example uses a call to an embedded (global) style sheet to change the style of
the left border from solid to groove when an onmouseover event occurs.
<HEAD>
<STYLE>
TD { border-left-style:solid; border-width=0.3cm }
.change { border-left-style:groove }
</STYLE>
</HEAD>
<BODY>
<TABLE BORDER>
<TR>
<TD onmouseover="this.className='change'"
onmouseout="this.className=''">
<IMG src="sphere.jpg">
</TD>
</TR>
</TABLE>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to change the style of the left border to groove
when an onmouseover event occurs.
<TD onmouseover="this.style.borderWidth='0.5cm';
this.style.borderLeftStyle='groove'">
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, currentStyle, custom, DD, DIR, DIV, DL, DT, EMBED, FIELDSET, FORM, Hn, HR, IFRAME, IMG,
INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset,
INPUT type=submit, INPUT type=text, ISINDEX, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, runtimeStyle, SPAN, style, TABLE,
TD, TEXTAREA, TH, UL, XMP
See Also
border
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
border-left-style Attribu... border-right Attribut
Web Workshop | DHTML, HTML & CSS
border-left-width Attribute | borderLeftWidth Property
Sets or retrieves the width of the left border of the object.
Syntax
Possible Values
The property is read/write with a default value of medium; the cascading style sheets
(CSS) attribute is not inherited.
To use this property, inline elements must either have an absolute position or layout.
Element layout is set by providing a value for the height property or the width
property.
Example
This example uses a call to an embedded (global) style sheet to change the width of
the left border width to 1 centimeter when a mouse click occurs.
<HEAD>
<STYLE>
TD { border-left-width:3mm }
.changeborder1 { border-left-width:1cm }
</STYLE>
</HEAD>
<BODY>
<TABLE BORDER>
<TR>
<TD onclick="this.className='changeborder1'"
ondblclick="this.className=''">
<IMG src="sphere.jpg">
</TD>
</TR></TABLE>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to change the width of the left border width to 1
centimeter when a mouse click occurs.
<TD onclick="this.style.borderLeftWidth='1cm'">
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, currentStyle, custom, DD, DIR, DIV, DL, DT, EMBED, FIELDSET, FORM, Hn, HR, IFRAME, IMG,
INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset,
INPUT type=submit, INPUT type=text, ISINDEX, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, runtimeStyle, SPAN, style, TABLE,
TD, TEXTAREA, TH, UL, XMP
See Also
border, borderWidth
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
border-left-width Attribu... border-right-color A
Web Workshop | DHTML, HTML & CSS
border-right Attribute | borderRight Property
Sets or retrieves the properties of the right border of the object.
Syntax
Possible Values
sRight String that specifies one or more of the following space-delimited values:
width Any of the range of width values available to the borderRightWidth property.
style Any of the range of style values available to the borderRightStyle property.
color Any of the range of color values available to the borderRightColor property.
The property is read/write with a default value of medium none; the cascading style
sheets (CSS) attribute is not inherited.
The borderRight property is a composite property that sets the width, color, and style
values for the right border of an object.
All individual border properties not set by the composite borderRight property are set
to their default values. For example, the default value for width is medium.
For more information about supported colors, see the Color Table.
To use this property, inline elements must have an absolute position or layout.
Element layout is set by providing a value for the height property or the width
property.
Example
The following examples use the borderRight property and the border-right attribute
to specify the composite properties.
This example uses a call to an embedded (global) style sheet to change the attributes
of the right border when an onmouseover event occurs.
<HEAD>
<STYLE>
TD { border-right:0.5cm solid yellow }
.change { border-right:0.5cm groove pink }
</STYLE>
</HEAD>
<BODY>
<TABLE>
<TR>
<TD onmouseover="this.className='change'"
onmouseout="this.className=''">
<IMG src="sphere.jpg"></TD>
</TR>
</TABLE>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to change the attributes of the right border when an
onmouseover event occurs.
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, custom, DD, DIR, DIV, DL, DT, EMBED, FIELDSET, FORM, Hn, HR, IFRAME, IMG, INPUT
type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT
type=submit, INPUT type=text, ISINDEX, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, runtimeStyle, SPAN, style, TABLE, TD,
TEXTAREA, TH, UL, XMP
See Also
border
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
border-right Attribute | ... border-right-style At
Web Workshop | DHTML, HTML & CSS
border-right-color Attribute | borderRightColor Property
Sets or retrieves the color of the right border of the object.
Syntax
Possible Values
sColor String that specifies one of the color names or red-green-blue (RGB) values in the Color Table.
The property is read/write with a default value equal to the value of the color property;
the cascading style sheets (CSS) attribute is not inherited.
To use this property, inline elements must have an absolute position or layout.
Element layout is set by providing a value for the height property or the width
property.
Some browsers do not recognize color names, but all browsers should recognize RGB
color values and display them correctly.
Example
This example uses a call to an embedded (global) style sheet to change the color of
the right border from red to blue when an onmouseover event occurs.
<HEAD>
<STYLE>
TD { border-right-color: red;
border-width: 0.5cm; border-style: groove}
.blue { border-right-color: blue }
</STYLE>
</HEAD>
<BODY>
<TABLE BORDER>
<TR>
<TD onmouseover="this.className='blue'"
onmouseout="this.className=''">
<IMG src="sphere.jpg">
</TD>
</TR>
</TABLE>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to change the color of the right border to blue when
an onmouseover event occurs.
<TD onmouseover="this.style.borderWidth='0.5cm';
this.style.borderRightColor='blue';>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, currentStyle, custom, DD, DIR, DIV, DL, DT, EMBED, FIELDSET, FORM, Hn, HR, IFRAME, IMG,
INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset,
INPUT type=submit, INPUT type=text, ISINDEX, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, runtimeStyle, SPAN, style, TABLE,
TD, TEXTAREA, TH, UL, XMP
See Also
border
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
border-right-color Attrib... border-right-width A
Web Workshop | DHTML, HTML & CSS
border-right-style Attribute | borderRightStyle Property
Sets or retrieves the style of the right border of the object.
Syntax
Possible Values
The property is read/write with a default value of none; the cascading style sheets
(CSS) attribute is not inherited.
To use this property, inline elements must have an absolute position or layout.
Element layout is set by providing a value for the height property or the width
property.
Example
This example uses a call to an embedded (global) style sheet to change the style of
the right border from solid to groove when an onmouseover event occurs.
<HEAD>
<STYLE>
TD { border-right-style:solid; border-width=0.3cm }
.change { border-right-style:groove }
</STYLE>
</HEAD>
<BODY>
<TABLE BORDER>
<TR>
<TD onmouseover="this.className='change'"
onmouseout="this.className=''">
<IMG src="sphere.jpg">
</TD>
</TR>
</TABLE>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to change the style of the right border to groove
when an onmouseover event occurs.
<TD onmouseover="this.style.borderWidth='0.5cm';
this.style.borderRightStyle='groove'">
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, currentStyle, custom, DD, DIR, DIV, DL, DT, EMBED, FIELDSET, FORM, Hn, HR, IFRAME, IMG,
INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset,
INPUT type=submit, INPUT type=text, ISINDEX, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, runtimeStyle, SPAN, style, TABLE,
TD, TEXTAREA, TH, UL, XMP
See Also
border
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
border-right-style Attrib... border-style Attribut
Web Workshop | DHTML, HTML & CSS
border-right-width Attribute | borderRightWidth Property
Sets or retrieves the width of the right border of the object.
Syntax
Possible Values
The property is read/write with a default value of medium; the cascading style sheets
(CSS) attribute is not inherited.
To use this property, inline elements must either have an absolute position or layout.
Element layout is set by providing a value for the height property or the width
property.
Example
This example uses a call to an embedded (global) style sheet to change the width of
the right border to 1 centimeter when a mouse click occurs.
<HEAD>
<STYLE>
TD { border-right-width:3mm }
.changeborder1 { border-right-width:1cm }
</STYLE>
</HEAD>
<BODY>
<TABLE BORDER>
<TR>
<TD onclick="this.className='changeborder1'"
ondblclick="this.className=''">
<IMG src="sphere.jpg">
</TD>
</TR></TABLE>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline script to change the width of the right border to 1 centimeter
when a mouse click occurs.
<TD onclick="this.style.borderRightWidth='1cm'">
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, currentStyle, custom, DD, DIR, DIV, DL, DT, EMBED, FIELDSET, FORM, Hn, HR, IFRAME, IMG,
INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset,
INPUT type=submit, INPUT type=text, ISINDEX, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, runtimeStyle, SPAN, style, TABLE,
TD, TEXTAREA, TH, UL, XMP
See Also
border, borderWidth
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
border-right-width Attrib... border-top Attribute
Web Workshop | DHTML, HTML & CSS
border-style Attribute | borderStyle Property
Sets or retrieves the style of the left, right, top, and bottom borders of the object.
Syntax
Possible Values
The property is read/write with a default value of none; the cascading style sheets
(CSS) attribute is not inherited.
To use this property, inline elements must have an absolute position or layout.
Element layout is set by providing a value for the height property or the width
property.
A border-width greater than 0 must be set for the border-style attribute to render.
Example
The following examples use the border-style attribute and the borderStyle property
to specify the border style.
This example uses a call to an embedded (global) style sheet to change the style of
the border to groove when an onmouseover event occurs.
<HEAD>
<STYLE>
TD { border-style:solid; border-width=0.5cm }
.change { border-style:groove }
</STYLE>
</HEAD>
<BODY>
<TABLE BORDER>
<TR>
<TD onmouseover="this.className='change'"
onmouseout="this.className=''">
<IMG src="sphere.jpg">
</TD>
</TR>
</TABLE>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to change the style of the border to groove when an
onmouseover event occurs.
<TD onmouseover="this.style.borderWidth='0.5cm';
this.style.borderStyle='groove'">
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, currentStyle, custom, DD, DIR, DIV, DL, DT, EMBED, FIELDSET, FORM, Hn, HR, IFRAME, IMG,
INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset,
INPUT type=submit, INPUT type=text, ISINDEX, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, runtimeStyle, SPAN, style, TABLE,
TD, TEXTAREA, TH, UL, XMP
See Also
border
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
border-style Attribute | ... border-top-color Attr
Web Workshop | DHTML, HTML & CSS
border-top Attribute | borderTop Property
Sets or retrieves the properties of the top border of the object.
Syntax
Possible Values
sTop String that specifies one or more of the following space-delimited values:
width Any of the range of width values available to the borderTopWidth property.
style Any of the range of style values available to the borderTopStyle property.
color Any of the range of color values available to the borderTopColor property.
The property is read/write with a default value of medium none; the cascading style
sheets (CSS) attribute is not inherited.
The borderTop property is a composite property that sets the width, color, and style
values for the top border of an object.
All individual border properties not set by the composite borderTop property are set
to their default values. For example, the default value for width is medium.
For more information about supported colors, see the Color Table.
To use this property, inline elements must have an absolute position or layout.
Element layout is set by providing a value for the height property or the width
property.
Example
The following examples use the border-top attribute and the borderTop property to
specify the composite properties.
This example uses a call to an embedded (global) style sheet to change the attributes
of the top border when an onmouseover event occurs.
<HEAD>
<STYLE>
TD { border-top:0.5cm solid yellow }
.change { border-top:0.5cm groove pink }
</STYLE>
</HEAD>
<BODY>
<TABLE>
<TR>
<TD onmouseover="this.className='change'"
onmouseout="this.className=''">
<IMG src="sphere.jpg">
</TD>
</TR>
</TABLE>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to change the top border when an onmouseover
event occurs.
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, custom, DD, DIR, DIV, DL, DT, EMBED, FIELDSET, FORM, Hn, HR, IFRAME, IMG, INPUT
type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT
type=submit, INPUT type=text, ISINDEX, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, runtimeStyle, SPAN, style, TABLE, TD,
TEXTAREA, TH, UL, XMP
See Also
border
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
border-top Attribute | bo... border-top-style Att
Web Workshop | DHTML, HTML & CSS
border-top-color Attribute | borderTopColor Property
Sets or retrieves the color of the top border of the object.
Syntax
Possible Values
sColor String that specifies one of the color names or red-green-blue (RGB) values in the Color Table.
The property is read/write with a default value equal to the value of the color property;
the cascading style sheets (CSS) attribute is not inherited.
To use this property, inline elements must have an absolute position or layout.
Element layout is set by providing a value for the height property or the width
property.
Some browsers do not recognize color names, but all browsers should recognize RGB
color values and display them correctly.
Example
The following examples use the border-top-color attribute and the borderTopColor
property to specify the color of the top border.
This example uses a call to an embedded (global) style sheet to change the color of
the top border to blue when an onmouseover event occurs.
<HEAD>
<STYLE>
TD { border-top-color: red;
border-width: 0.5cm; border-style: groove }
.blue { border-top-color: blue }
</STYLE>
</HEAD>
<BODY>
<TABLE BORDER>
<TR>
<TD onmouseover="this.className='blue'"
onmouseout="this.className=''">
</TD>
</TR>
</TABLE>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to change the color of the top border to blue when
an onmouseover event occurs.
<TD onmouseover="this.style.borderWidth='0.5cm';
this.style.borderTopColor='blue'">
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, currentStyle, custom, DD, DIR, DIV, DL, DT, EMBED, FIELDSET, FORM, Hn, HR, IFRAME, IMG,
INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset,
INPUT type=submit, INPUT type=text, ISINDEX, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, runtimeStyle, SPAN, style, TABLE,
TD, TEXTAREA, TH, UL, XMP
See Also
border
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
border-top-color Attribut... border-top-width At
Web Workshop | DHTML, HTML & CSS
border-top-style Attribute | borderTopStyle Property
Sets or retrieves the style of the top border of the object.
Syntax
Possible Values
The property is read/write with a default value of none; the cascading style sheets
(CSS) attribute is not inherited.
To use this property, inline elements must have an absolute position or layout.
Element layout is set by providing a value for the height property or the width
property.
Example
The following examples use the border-top-style attribute and the borderTopStyle
property to specify the style of the top border.
This example uses a call to an embedded (global) style sheet to change the style of
the top border from solid to groove when an onmouseover event occurs.
<HEAD>
<STYLE>
TD { border-top-style:solid;
border-width=0.3cm }
.change { border-top-style:groove}
</STYLE>
</HEAD>
<BODY>
<TABLE BORDER>
<TR>
<TD onmouseover="this.className='change'"
onmouseout="this.className=''">
<IMG src="sphere.jpg">
</TD>
</TR>
</TABLE>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to change the style of the top border to groove
when an onmouseover event occurs.
<TD onmouseover="this.style.borderWidth='0.5cm';
this.style.borderTopStyle='groove'">
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, currentStyle, custom, DD, DIR, DIV, DL, DT, EMBED, FIELDSET, FORM, Hn, HR, IFRAME, IMG,
INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset,
INPUT type=submit, INPUT type=text, ISINDEX, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, runtimeStyle, SPAN, style, TABLE,
TD, TEXTAREA, TH, UL, XMP
See Also
border
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
border-top-style Attribut... border-width Attribu
Web Workshop | DHTML, HTML & CSS
border-top-width Attribute | borderTopWidth Property
Sets or retrieves the width of the top border of the object.
Syntax
Possible Values
The property is read/write with a default value of medium; the cascading style sheets
(CSS) attribute is not inherited.
To use this property, inline elements must have an absolute position or layout.
Element layout is set by providing a value for the height property or the width
property.
Example
This example uses a call to an embedded (global) style sheet to change the width of
the top border to 1 centimeter when a mouse click occurs.
<HEAD>
<STYLE>
TD { border-top-width:3mm }
.changeborder1 { border-top-width:1cm }
</STYLE>
</HEAD>
<BODY>
<TABLE BORDER>
<TR>
<TD onclick="this.className='changeborder1'"
ondblclick="this.className=''">
<IMG src="sphere.jpg">
</TD>
</TR>
</TABLE>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline script to change the width of the top border to 1 centimeter
when a mouse click occurs.
<TD onclick="this.style.borderTopWidth='1cm'">
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, currentStyle, custom, DD, DIR, DIV, DL, DT, EMBED, FIELDSET, FORM, Hn, HR, IFRAME, IMG,
INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset,
INPUT type=submit, INPUT type=text, ISINDEX, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, runtimeStyle, SPAN, style, TABLE,
TD, TEXTAREA, TH, UL, XMP
See Also
border
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
border-top-width Attribut... bottom Property
Web Workshop | DHTML, HTML & CSS
border-width Attribute | borderWidth Property
Sets or retrieves the width of the left, right, top, and bottom borders of the object.
Syntax
Possible Values
The property is read/write with a default value of medium; the cascading style sheets
(CSS) attribute is not inherited.
Up to four different widths can be specified, in the following order: top, right, bottom,
left. If one width is specified, it is used for all four sides. If two widths are specified,
the first is used for the top and bottom borders, and the second is used for left and
right borders. If three widths are specified, they are used for top, right/left, and
bottom borders, respectively.
To use this property, inline elements must have an absolute position or layout.
Element layout is set by providing a value for the height property or the width
property.
The borderWidth property does not render if the borderStyle property is set to none.
Example
The following examples use the border-width attribute and the borderWidth
property to specify the width of the border.
This example uses a call to an embedded (global) style sheet to change the width of
the border to 1 centimeter when a mouse click occurs.
<HEAD>
<STYLE>
TD { border-width:3mm }
.changeborder1 { border-width:1cm }
</STYLE>
</HEAD>
<BODY>
<TABLE BORDER>
<TR>
<TD onclick="this.className='changeborder1'"
ondblclick="this.className=''">
<IMG src="sphere.jpg"></TD>
</TR>
</TABLE>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline script to change the width of the border to 1 centimeter when
a mouse click occurs.
<TD onclick="this.style.borderWidth='1cm'">
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, currentStyle, custom, DD, DIR, DIV, DL, DT, EMBED, FIELDSET, FORM, Hn, HR, IFRAME, IMG,
INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset,
INPUT type=submit, INPUT type=text, ISINDEX, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, runtimeStyle, SPAN, style, TABLE,
TD, TEXTAREA, TH, UL, XMP
See Also
border
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
CLASS Attribute | classNa... CLEAR Attribute |
Web Workshop | DHTML, HTML & CSS
clear Attribute | clear Property
Sets or retrieves whether the object allows floating objects on its left and/or right sides, so
that the next text displays past the floating objects.
Syntax
Possible Values
The property is read/write with a default value of none; the cascading style sheets
(CSS) attribute is not inherited.
The value of this property lists the sides where floating objects are not accepted.
Example
The following examples use the clear attribute and the clear property to specify
placement of text relative to floating objects.
This example uses a call to an embedded (global) style sheet to move the text below
the floating objects when italic text is encountered.
<STYLE>
I { clear:left }
</STYLE>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example changes the position of the paragraph relative to the floating object on
its left side.
<HEAD>
<SCRIPT>
function fnClear(){
oClear.style.clear="left";
}
function fnClear2(){
oClear.style.clear="none";
}
</SCRIPT>
</HEAD>
<BODY>
<img src="/workshop/graphics/sphere.jpg" style="float:left">
<SPAN ID="oClear">
<P>This is an example of the clear attribute.<P>
</span>
<P>
<INPUT TYPE=button value="clear = left"
onclick="fnClear()">
<INPUT TYPE=button value="clear = none"
onclick="fnClear2()">
</P>
</BODY>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
A, ADDRESS, APPLET, B, BIG, BLOCKQUOTE, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, currentStyle, custom, DD, DFN, DIR, DIV,
DL, DT, EM, EMBED, FIELDSET, FORM, Hn, HR, I, IFRAME, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image,
INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING,
MARQUEE, MENU, OBJECT, OL, OPTION, P, PLAINTEXT, PRE, runtimeStyle, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP,
TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
firstChild Property font Attribute | font Pro...
Web Workshop | DHTML, HTML & CSS
float Attribute | styleFloat Property
Sets or retrieves on which side of the object the text will flow.
Syntax
Possible Values
The property is read/write with a default value of none; the cascading style sheets
(CSS) attribute has a default value of none and is not inherited.
With a value of left or right, the object is treated as block-level—that is, the display
property is ignored. For example, floating paragraphs allow the paragraphs to appear
side-by-side on a page.
Objects following a floating object move in relation to the position of the floating
object.
The floating object is moved left or right until it reaches the border, padding, or margin
of another block-level object.
DIV and SPAN objects must have a width set for the float attribute to render. In
Internet Explorer 5, DIV and SPAN objects are assigned a width by default and will
render if a width is not specified.
Example
This example shows how the float attribute affects the flow of the text. The sphere
image floats to the left of the text, and the cone floats to the right.
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting and the styleFloat property to swap images when
the mouse moves over the button.
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
A, ADDRESS, APPLET, B, BIG, BLOCKQUOTE, BUTTON, CENTER, CITE, CODE, currentStyle, custom, DD, DFN, DIR, DIV, DL, DT, EM, EMBED,
FIELDSET, FORM, Hn, HR, I, IFRAME, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password,
INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU,
OBJECT, OL, P, PRE, RT, RUBY, runtimeStyle, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE, TEXTAREA, TT, U, UL,
VAR, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
LOWSRC Attribute | lowsrc... margin-bottom At
Web Workshop | DHTML, HTML & CSS
margin Attribute | margin Property
Sets or retrieves the width of the left, right, bottom, and top margins of the object.
Syntax
Possible Values
The property is read/write with a default value of 0; the cascading style sheets (CSS)
attribute is not inherited.
This is a composite property that specifies up to four width values, in the following
order: top, right, bottom, left. If one width value is specified, it is used for all four
sides. If two width values are specified, the first is used for the top and bottom
borders, and the second is used for left and right borders. If three width values are
specified, they are used for the top, right/left, and bottom borders, respectively.
Negative margins are supported except for top and bottom margins on inline objects.
As of Internet Explorer 4.0, you can specify length values relative to the height of the
element's font (em) or the height of the letter "x" (ex).
In Internet Explorer 3.0, the specified margin value is added to the default value of the
object. In Internet Explorer 4.0 and later, the margin value is absolute. The margin
properties do not work with the TD and TR objects in Internet Explorer 4.0, but they
do work in Internet Explorer 3.0. To set margins in the cell for Internet Explorer 4.0
and later, apply the margin to an object, such as DIV or P, within the TD.
To use this property, inline objects must have an absolute position or layout. Element
layout is set by providing a value for the height property or the width property.
Example
The following examples use the margin attribute and the margin property to change
the margin of the object.
This example uses the IMG object as a selector to set the margin of images to 1
centimeter.
<STYLE>
IMG { margin:1cm }
</STYLE>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to set the margin of the image to 5 millimeters when
an onmouseover event occurs.
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, currentStyle, custom, DD, DIR, DIV, DL, DT, EMBED, FIELDSET, FORM, Hn, HR, IFRAME, IMG,
INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset,
INPUT type=submit, INPUT type=text, ISINDEX, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, runtimeStyle, SPAN, style, TABLE,
TD, TEXTAREA, TH, UL, XMP
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
margin Attribute | margin... MARGINHEIGHT At
Web Workshop | DHTML, HTML & CSS
margin-bottom Attribute | marginBottom Property
Sets or retrieves the height of the bottom margin of the object.
Syntax
Possible Values
The property is read/write with a default value of 0; the cascading style sheets (CSS)
attribute is not inherited.
As of Internet Explorer 4.0 and later, you can specify possible length values relative to
the height of the element's font (em) or the height of the letter "x" (ex).
In Internet Explorer 3.0, the specified margin value is added to the default value of the
object. In Internet Explorer 4.0 and later, the margin value is absolute. The margin
properties do not work with the TD and TR objects in Internet Explorer 4.0, but they
do work in Internet Explorer 3.0. To set margins in the cell for Internet Explorer 4.0
and later, apply the margin to an object, such as DIV or P, within the TD.
To use this property, inline objects must have an absolute position or layout. Element
layout is set by providing a value for the height property or the width property.
Negative margins are supported, except for top and bottom margins on inline objects.
Example
The following examples use the margin-bottom attribute and the marginBottom
property to change the margin of the object.
This example uses the IMG object as a selector to set the bottom margin on images to
2 centimeters.
<STYLE>
IMG { margin-bottom:2cm }
</STYLE>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to set the bottom margin of the image to 1
centimeter when an onmouseover event occurs.
<IMG
src="sphere.jpg"onmouseover="this.style.marginBottom='1cm'">
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, currentStyle, custom, DD, DIR, DIV, DL, DT, EMBED, FIELDSET, FORM, Hn, HR, IFRAME, IMG,
INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset,
INPUT type=submit, INPUT type=text, ISINDEX, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, runtimeStyle, SPAN, style, TABLE,
TD, TEXTAREA, TH, UL, XMP
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
MARGINHEIGHT Attribute | ... margin-right Att
Web Workshop | DHTML, HTML & CSS
margin-left Attribute | marginLeft Property
Sets or retrieves the width of the left margin of the object.
Syntax
Possible Values
The property is read/write with a default value of 0; the cascading style sheets (CSS)
attribute is not inherited.
As of Internet Explorer 4.0 and later, you can specify possible length values relative to
the height of the element's font (em) or the height of the letter "x" (ex).
In Internet Explorer 3.0, the specified margin value is added to the default value of the
object. In Internet Explorer 4.0 and later, the margin value is absolute. The margin
properties do not work with the TD and TR objects in Internet Explorer 4.0, but they
do work in Internet Explorer 3.0. To set margins in the cell for Internet Explorer 4.0
and later, apply the margin to an object, such as DIV or P, within the TD.
To use this property, inline objects must have an absolute position or layout. Element
layout is set by providing a value for the height property or the width property.
Negative margins are supported, except for top and bottom margins on inline objects.
Example
The following examples use the margin-left attribute and the marginLeft property to
change the margin of the object.
This example uses the IMG object as a selector to set the left margin to 2 centimeters
for all images.
<STYLE>
IMG { margin-left:2cm }
</STYLE>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to set the left margin of the image to 1 centimeter
when an onclick event occurs.
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, currentStyle, custom, DD, DIR, DIV, DL, DT, EMBED, FIELDSET, FORM, Hn, HR, IFRAME, IMG,
INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset,
INPUT type=submit, INPUT type=text, ISINDEX, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, runtimeStyle, SPAN, style, TABLE,
TD, TEXTAREA, TH, UL, XMP
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
margin-left Attribute | m... margin-top Attribut
Web Workshop | DHTML, HTML & CSS
margin-right Attribute | marginRight Property
Sets or retrieves the width of the right margin of the object.
Syntax
Possible Values
The property is read/write with a default value of 0; the cascading style sheets (CSS)
attribute is not inherited.
As of Internet Explorer 4.0 and later, you can specify possible length values relative to
the height of the element's font (em) or the height of the letter "x" (ex).
In Internet Explorer 3.0, the specified margin value is added to the default value of the
object. In Internet Explorer 4.0 and later, the margin value is absolute. The margin
properties do not work with the TD and TR objects in Internet Explorer 4.0, but they
do work in Internet Explorer 3.0. To set margins in the cell for Internet Explorer 4.0
and later, apply the margin to an object, such as DIV or P, within the TD.
To use this property, inline objects must have an absolute position or layout. Element
layout is set by providing a value for the height property or the width property.
Negative margins are supported, except for top and bottom margins on inline objects.
Example
The following examples use the margin-right attribute and the marginRight
property to change the margin of the object.
This example uses IMG as a selector and margin1 as a class in an embedded style
sheet to set the right margin of an image when an onclick event or ondblclick event
occurs.
<STYLE>
IMG { margin-right:1cm }
.margin1 { margin-right:2cm }
</STYLE>
</HEAD>
<BODY>
<IMG src="sphere.jpg" onclick="this.className='margin1'"
ondblclick="this.className=''">
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to set the right margin of the image to 1 centimeter
when the onclick event occurs.
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, currentStyle, custom, DD, DIR, DIV, DL, DT, EMBED, FIELDSET, FORM, Hn, HR, IFRAME, IMG,
INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset,
INPUT type=submit, INPUT type=text, ISINDEX, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, runtimeStyle, SPAN, style, TABLE,
TD, TEXTAREA, TH, UL, XMP
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
margin-right Attribute | ... MARGINWIDTH Attr
Web Workshop | DHTML, HTML & CSS
margin-top Attribute | marginTop Property
Sets or retrieves the height of the top margin of the object.
Syntax
Possible Values
The property is read/write with a default value of 0; the cascading style sheets (CSS)
attribute is not inherited.
As of Internet Explorer 4.0 and later, you can specify possible length values relative to
the height of the element's font (em) or the height of the letter "x" (ex).
In Internet Explorer 3.0, the specified margin value is added to the default value of the
object. In Internet Explorer 4.0 and later, the margin value is absolute. The margin
properties do not work with the TD and TR objects in Internet Explorer 4.0, but they
do work in Internet Explorer 3.0. To set margins in the cell for Internet Explorer 4.0
and later, apply the margin to an object, such as DIV or P, within the TD.
To use this property, inline objects must have an absolute position or layout. Element
layout is set by providing a value for the height property or the width property.
Negative margins are supported, except for top and bottom margins on inline objects.
Example
The following examples use the margin-top attribute and the marginTop property to
change the margin of the object.
This example uses HR as a selector and margin1 as a class in an embedded style sheet
to set the top margin of the horizontal rule.
<STYLE>
HR { margin-top:2cm }
.margin1 { margin-top:4cm }
</STYLE>
</HEAD>
<BODY>
<HR onclick="this.className='margin1'"
ondblclick="this.className=''">
</STYLE>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to set and reset the margin when the onclick and
ondblclick events occur, respectively.
<HR onclick="this.style.marginTop='2cm'"
ondblclick="this.style.marginTop=''">
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, currentStyle, custom, DD, DIR, DIV, DL, DT, EMBED, FIELDSET, FORM, Hn, HR, IFRAME, IMG,
INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset,
INPUT type=submit, INPUT type=text, ISINDEX, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, runtimeStyle, SPAN, style, TABLE,
TD, TEXTAREA, TH, UL, XMP
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
owningElement Property padding-bottom Attrib
Web Workshop | DHTML, HTML & CSS
padding Attribute | padding Property
Sets or retrieves the amount of space to insert between the object and its margin or, if
there is a border, between the object and its border.
Syntax
Possible Values
The property is read/write with a default value of 0; the cascading style sheets (CSS)
attribute is not inherited.
This is a composite property that specifies up to four padding values, in the following
order: top, right, bottom, left. If one width value is specified, it is used for all four
sides. If two width values are specified, the first is used for the top and bottom
borders, and the second is used for left and right borders. If three width values are
specified, they are used for top, right/left, and bottom borders, respectively. Negative
values are not allowed.
To use this property, inline elements must have an absolute position or layout.
Element layout is set by providing a value for the height property or the width
property.
Example
The following examples use the padding attribute and the padding property to
change the padding of the object.
<STYLE>
TD { padding:3mm 8mm }
.padding1 { padding:1cm }
</STYLE>
</HEAD>
<BODY>
<TABLE BORDER>
<TR>
<TD onmouseover="this.className='padding1'"
onmouseout="this.className=''" ALIGN=middle>
<IMG src="sphere.jpg">
</TD>
</TR>
</TABLE>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to set the cell's top and bottom padding to 0.5
centimeters and its left and right padding to 0.2 centimeters when an onmouseover
event occurs.
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
A, ACRONYM, ADDRESS, APPLET, B, BDO, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, custom, DD,
DEL, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, FRAME, Hn, HR, I, IFRAME, IMG, INPUT type=button, INPUT type=checkbox,
INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, INS,
KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, NEXTID, NOBR, OBJECT, OL, P, PLAINTEXT, PRE, Q, RT, RUBY, S, SAMP, SELECT, SMALL,
SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
padding Attribute | paddi... padding-left Attribu
Web Workshop | DHTML, HTML & CSS
padding-bottom Attribute | paddingBottom Property
Sets or retrieves the amount of space to insert between the bottom border of the object
and the content.
Syntax
Possible Values
The property is read/write with a default value of 0; the cascading style sheets (CSS)
attribute is not inherited.
To use this property, inline elements must have an absolute position or layout.
Element layout is set by providing a value for the height property or the width
property.
Example
The following examples use the padding-bottom attribute and the paddingBottom
property to change the padding of the object.
This example uses TD as a selector in an embedded style sheet to set the bottom
padding for all table cells to 1 centimeter.
<STYLE>
TD { padding-bottom:1cm }
</STYLE>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to set the cell's bottom padding to 1 centimeter
when an onmouseover event occurs.
<TD onmouseover="this.style.paddingBottom='1cm'"
onmouseout="this.style.paddingBottom=''">
<IMG src="sphere.jpg">
</TD>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
A, ACRONYM, ADDRESS, APPLET, B, BDO, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, custom, DD,
DEL, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, FRAME, Hn, HR, I, IFRAME, IMG, INPUT type=button, INPUT type=checkbox,
INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, INS,
KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, NEXTID, NOBR, OBJECT, OL, P, PLAINTEXT, PRE, Q, RT, RUBY, S, SAMP, SELECT, SMALL,
SPAN, STRIKE, STRONG, SUB, SUP, TD, TEXTAREA, TH, TT, U, UL, VAR, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
padding-bottom Attribute ... padding-right Attr
Web Workshop | DHTML, HTML & CSS
padding-left Attribute | paddingLeft Property
Sets or retrieves the amount of space to insert between the left border of the object and
the content.
Syntax
Possible Values
The property is read/write with a default value of 0; the cascading style sheets (CSS)
attribute is not inherited.
To use this property, inline elements must have an absolute position or layout.
Element layout is set by providing a value for the height property or the width
property.
Example
The following examples use the padding-left attribute and the paddingLeft property
to change the padding of the object.
This example uses TD as a selector in an embedded style sheet to set the left padding
for all table cells to 1 centimeter.
<STYLE>
TD { padding-left:1cm }
</STYLE>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to set the cell's left padding to 1 centimeter when an
onmouseover event occurs.
<TD onmouseover="this.style.paddingLeft='1cm'"
onmouseout="this.style.paddingLeft=''">
<IMG src="sphere.jpg">
</TD>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
A, ACRONYM, ADDRESS, APPLET, B, BDO, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, custom, DD,
DEL, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, FRAME, Hn, HR, I, IFRAME, IMG, INPUT type=button, INPUT type=checkbox,
INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, INS,
KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, NEXTID, NOBR, OBJECT, OL, P, PLAINTEXT, PRE, Q, RT, RUBY, S, SAMP, SELECT, SMALL,
SPAN, STRIKE, STRONG, SUB, SUP, TD, TEXTAREA, TH, TT, U, UL, VAR, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
padding-left Attribute | ... padding-top Attribut
Web Workshop | DHTML, HTML & CSS
padding-right Attribute | paddingRight Property
Sets or retrieves the amount of space to insert between the right border of the object and
the content.
Syntax
Possible Values
The property is read/write with a default value of 0; the cascading style sheets (CSS)
attribute is not inherited.
To use this property, inline elements must have an absolute position or layout.
Element layout is set by providing a value for the height property or the width
property.
Example
The following examples use the padding-right attribute and the paddingRight
property to change the padding of the object.
This example uses TD as a selector in an embedded style sheet to set the right
padding for all table cells to 1 centimeter.
<STYLE>
TD { padding-right:1cm }
</STYLE>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to set the cell's right padding to 1 centimeter when
an onmouseover event occurs.
<TD onmouseover="this.style.paddingRight='1cm'"
onmouseout="this.style.paddingRight=''">
<IMG src="sphere.jpg">
</TD>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
A, ACRONYM, ADDRESS, APPLET, B, BDO, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, custom, DD,
DEL, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, FRAME, Hn, HR, I, IFRAME, IMG, INPUT type=button, INPUT type=checkbox,
INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, INS,
KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, NEXTID, NOBR, OBJECT, OL, P, PLAINTEXT, PRE, Q, RT, RUBY, S, SAMP, SELECT, SMALL,
SPAN, STRIKE, STRONG, SUB, SUP, TD, TEXTAREA, TH, TT, U, UL, VAR, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
padding-right Attribute |... page-break-after At
Web Workshop | DHTML, HTML & CSS
padding-top Attribute | paddingTop Property
Sets or retrieves the amount of space to insert between the top border of the object and
the content.
Syntax
Possible Values
The property is read/write with a default value of 0; the cascading style sheets (CSS)
attribute is not inherited.
To use this property, inline elements must have an absolute position or layout.
Element layout is set by providing a value for the height property or the width
property.
Example
The following examples use the padding-top attribute and the paddingTop property
to change the padding of the object.
This example uses TD as a selector in an embedded style sheet to set the top padding
for all table cells to 1 centimeter.
<STYLE>
TD { padding-top:1cm }
</STYLE>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to set the cell's top padding to 1 centimeter when an
onmouseover event occurs.
<TD onmouseover="this.style.paddingTop='1cm'"
onmouseout="this.style.paddingTop=''">
<IMG src="sphere.jpg">
</TD>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
A, ACRONYM, ADDRESS, APPLET, B, BDO, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, custom, DD,
DEL, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, FRAME, Hn, HR, I, IFRAME, IMG, INPUT type=button, INPUT type=checkbox,
INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, INS,
KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, NEXTID, NOBR, OBJECT, OL, P, PLAINTEXT, PRE, Q, RT, RUBY, S, SAMP, SELECT, SMALL,
SPAN, STRIKE, STRONG, SUB, SUP, TD, TEXTAREA, TH, TT, U, UL, VAR, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
TABINDEX Attribute | tabI... tagName Property
Web Workshop | DHTML, HTML & CSS
table-layout Attribute | tableLayout Property
Sets or retrieves whether the table layout is fixed.
Syntax
Possible Values
The property is read/write with a default value of auto; the cascading style sheets
(CSS) attribute is not inherited.
You can optimize table rendering performance by specifying the tableLayout property.
This property causes Internet Explorer to render the table one row at a time, providing
users with information at a faster pace. The tableLayout property determines column
widths for a table in the following order:
1. By using information in the width property for the COL or COLGROUP element.
2. By using information in the width property for the TD elements in the first row.
3. By dividing the table columns equally, regardless of the size of the content.
If the content of a cell exceeds the fixed width of the column, the content is wrapped
or, if wrapping is not possible, it is clipped. If the tableLayout property is set to
fixed, the overflow property can be used to handle content that exceeds the width of
a TD element. If the row height is specified, wrapped text is clipped when it exceeds
the set height.
Setting the property to fixed significantly improves table rendering speed, particularly
for longer tables.
Setting row height further improves rendering speed, again enabling the browser's
parser to begin rendering the row without having to examine the content of each cell
in the row to determine row height.
Example
This example uses the CSS attribute to set the table layout to fixed.
<TABLE STYLE="table-layout:fixed" WIDTH=600>
<COL WIDTH=100><COL WIDTH=300><COL WIDTH=200>
<TR HEIGHT=20>
<TD>...</TD><TD>...</TD><TD>...</TD>
</TR>
:
</TABLE>
This feature requires Internet Explorer 5 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
disabled Property documentElement Property
Web Workshop | DHTML, HTML & CSS
display Attribute | display Property
Sets or retrieves whether the object is rendered.
Syntax
Possible Values
The property is read/write with a default value of block for block elements and inline
for inline elements; the cascading style sheets (CSS) attribute is not inherited.
In Internet Explorer 4.0, the block, inline, and list-item values are not supported
explicitly, but do render the element.
The block and inline values are supported explicitly as of Internet Explorer 5.
All visible HTML objects are block or inline. For example, a DIV object is a block
element, and a SPAN object is an inline element. Block elements typically start a new
line and can contain other block elements and inline elements. Inline elements do not
typically start a new line and can contain other inline elements or data. Changing the
values for the display property affects the layout of the surrounding content by:
Adding a new line after the element with the value block.
Removing a line from the element with the value inline.
Hiding the data for the element with the value none.
In contrast to the visibility property, display=none reserves no space for the object on
the screen.
This example show the effect of changing the values for the display property between
inline, block, and none.
Applies To
A, ACRONYM, ADDRESS, APPLET, B, BDO, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, custom, DD,
DEL, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, FRAME, Hn, HR, I, IFRAME, IMG, INPUT type=button, INPUT type=checkbox,
INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, INS,
KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, NEXTID, NOBR, OBJECT, OL, P, PLAINTEXT, PRE, Q, RT, RUBY, S, SAMP, SELECT, SMALL,
SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
linkColor Property list-style-image Attribut...
Web Workshop | DHTML, HTML & CSS
list-style attribute | listStyle Property
Sets or retrieves up to three separate listStyle properties of the object.
Syntax
Possible Values
sStyle String that specifies up to three of the following values, in any order:
type Any of the range of type values available to the listStyleType property.
position Any of the range of position values available to the listStylePosition property.
image Any of the range of image values available to the listStyleImage property.
The property is read/write with a default value set by the browser; the cascading style
sheets (CSS) attribute is inherited.
The listStyle property is a composite property. When specifying both the type and
image values, the image value takes precedence, unless the image value is set to none
or the image pointed to by the URL cannot display.
When the left margin of a list item is set to 0 using one of the margin properties, the
list item markers do not show. The margin should be set to a minimum of 30 points.
Example
The following examples use the list-style attribute and the listStyle property to set
the list style.
Note For the UL.compact to override the image that is set with the UL selector, you
must explicitly set the list-style-image attribute to 'none'.
<STYLE>
UL { list-style: outside url(dot.gif) }
UL.compact { list-style-image:none; list-style: inside
circle }
</STYLE>
</HEAD>
<BODY>
<UL>
<LI>...
<LI>...
</UL>
<UL CLASS=compact>
<LI>...
<LI>...
</UL>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to change the style of the list. If the default image
cannot be located, a hollow circle is used.
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
list-style attribute | li... list-style-position Attri.
Web Workshop | DHTML, HTML & CSS
list-style-image Attribute | listStyleImage Property
Sets or retrieves which image to use as a list-item marker for the object.
Syntax
Possible Values
The property is read/write with a default value of none; the cascading style sheets
(CSS) attribute is inherited.
When the image is available, it replaces the marker that is set with the listStyleType
marker.
If the left margin of the list item is set to 0 using one of the margin properties, the list-
item markers do not show. The margin should be set to a minimum of 30 points.
Example
The following examples use the list-style-image attribute and the listStyleImage
property to set the image for markers.
This example uses UL as a selector in an embedded (global) style sheet to set the
marker to the dot.gif image.
<STYLE>
UL { list-style-image:url(dot.gif) }
</STYLE>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to change the style of the list-item marker to an
image when an onmouseover event occurs.
<UL onmouseover="this.style.listStyleImage='url(dot.gif)'">
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
list-style-image Attribut... list-style-type Attribu
Web Workshop | DHTML, HTML & CSS
list-style-position Attribute | listStylePosition Property
Sets or retrieves how the list-item marker is drawn relative to the content of the object.
Syntax
Possible Values
The property is read/write with a default value of outside; the cascading style sheets
(CSS) attribute is inherited.
If the left margin of a list item is set to 0 using one of the margin properties, the list-
item markers do not show. The margin should be set to a minimum of 30 points.
Example
<STYLE>
UL { list-style-position:inside }
UL.compact { list-style-position:outside }
</STYLE>
</HEAD>
<BODY>
<UL>
<LI>...
<LI>...
</UL>
<UL CLASS=compact>
<LI>...
<LI>...
</UL>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to change the marker position when an
onmouseover event occurs.
<SPAN STYLE="width:3cm"
onmouseover="this.style.listStylePosition='inside'"
onmouseout="this.style.listStylePosition='outside'">
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
list-style-position Attri... LOOP Attribute | loop
Web Workshop | DHTML, HTML & CSS
list-style-type Attribute | listStyleType Property
Sets or retrieves the predefined type of the line-item marker for the object.
Syntax
Possible Values
The property is read/write with a default value of disc; the cascading style sheets
(CSS) attribute is inherited.
The listStyleType property determines the appearance of the list-item marker if the
value of the list-style-image attribute is set to none, or if the image pointed to by the
URL cannot be displayed.
If the left margin of a line item is set to 0 using one of the margin properties, the list-
item markers do not show. The margin should be set to a minimum of 30 points.
Example
The following examples use the list-style-type attribute and the listStyleType
property to set the markers.
This example uses UL as a selector in an embedded (global) style sheet to change the
marker type to circle.
<STYLE>
UL { list-style-type:circle }
</STYLE>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to change the marker type on when an onmouseover
event occurs.
<UL onmouseover="this.style.listStyleType='circle'">
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
bottom Property BOTTOMMARGIN Attribute | ..
Web Workshop | DHTML, HTML & CSS
bottom Attribute | bottom Property
Sets or retrieves the bottom position of the object in relation to the bottom of the next
positioned object in the document hierarchy.
Syntax
Possible Values
The property is read/write with a default value of auto; the cascading style sheets
(CSS) attribute is not inherited.
The bottom attribute should be used only when the position attribute is set;
otherwise, the value of the bottom attribute is ignored.
Because the value of the bottom property is a string, the property cannot be used in
script to calculate the position of the object in the document; instead, the pixelBottom
property or the posBottom property should be used.
For more information about how to access the dimension and location of objects on the
page through the DHTML object model, see measuring element dimension and location
.
I
Example
This example uses the bottom attribute to set a DIV object 50 pixels from the bottom
of the client area.
Applies To
A, ADDRESS, APPLET, B, BIG, BLOCKQUOTE, BUTTON, CENTER, CITE, CODE, currentStyle, custom, DD, DFN, DIR, DIV, DL, FIELDSET, FORM, Hn,
HR, I, IFRAME, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio,
INPUT type=reset, INPUT type=submit, INPUT type=text, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PRE,
runtimeStyle, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE, TEXTAREA, TT, U, UL, VAR, XMP
See Also
pixelTop, posTop
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
clientY Property clipBottom Property DHTML P
Web Workshop | DHTML, HTML & CSS
clip Attribute | clip Property
Sets or retrieves which part of a positioned object is visible.
Syntax
Possible Values
The property is read/write with a default value of auto; the cascading style sheets
(CSS) attribute is not inherited.
This property defines the shape and size of the positioned object that is visible. The
position must be set to absolute. Any part of the object that is outside the clipping
region is transparent. Any coordinate can be replaced by the value auto, which
exposes the respective side (meaning the side is not clipped).
The order of the values clip:rect(0 0 50 50) renders the object invisible as it sets
the top and right positions of the clipping region to 0. To achieve a 50-by-50 view port,
use clip:rect(0 50 50 0).
The clip attribute and the clip property are available on the Macintosh platform, as of
Internet Explorer 5.
Example
The following examples use clip attribute and the clip property to modify the
appearance of an image.
This example uses a call to an embedded (global) style sheet to clip the image.
<DIV Style="position:absolute;top:0;left:200;
clip:rect(0.6cm 3cm 2cm 0.5cm)">
<IMG SRC="sphere.jpg">
</DIV>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
A, ADDRESS, APPLET, B, BDO, BIG, BLOCKQUOTE, BUTTON, CENTER, CITE, CODE, custom, DD, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET,
FORM, Hn, HR, I, IFRAME, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT
type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, OBJECT, OL,
P, PRE, RUBY, runtimeStyle, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE, TD, TEXTAREA, TH, TR, TT, U, UL, VAR,
XMP
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
height Property HEIGHT Attribute | height...
Web Workshop | DHTML, HTML & CSS
height Attribute | height Property
Sets or retrieves the height of the object.
Syntax
Possible Values
The property is read/write with a default value of auto; the CSS attribute is not
inherited.
If the height property of an IMG is specified, but width property is not specified, the
resulting width of the IMG is sized proportionally according to the specified height
property and the actual width (in pixels) of the image in the source file.
If you specify the height property of an IMG, and both the height and width of the
image in the source file are identical, the width of the image will match the height.
If you specify the height property and width property of an IMG, the resulting image
dimensions will match those specified.
Percentage values refer to the parent object's height. Negative values are not allowed.
The following examples use the height attribute and the height property to change
the height of the object.
This example uses an inline style sheet to set the height of an image to 4 centimeters.
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to change the height of an image when an onclick
event occurs.
<BUTTON onclick="height1.style.height='1cm'">Shrink
sphere</BUTTON>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
APPLET, BUTTON, currentStyle, custom, DIV, EMBED, FIELDSET, HR, IFRAME, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file,
INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, ISINDEX, MARQUEE,
OBJECT, runtimeStyle, SPAN, style, TABLE, TEXTAREA, TR
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
layout-grid-type Attribut... left Property DHTM
Web Workshop | DHTML, HTML & CSS
left Attribute | left Property
Sets or retrieves the position of the object relative to the left edge of the next positioned
object in the document hierarchy.
Syntax
Possible Values
This property is read/write with a default value of auto; the cascading style sheets
(CSS) attribute is not inherited.
You should use the left attribute only when the position attribute is set; otherwise, the
value of the left attribute is ignored.
Because the value of the left property is a string, you cannot use the property in script
to calculate the position of the object in the document; instead, you should use the
pixelLeft property or the posLeft property.
For more information about how to access the dimension and location of objects on the
page through the DHTML object model, see measuring element dimension and location
.
I
Example
The following examples use the left attribute and the left property to change the
position of the object.
This example uses an inline style sheet to set the position of an image 100 pixels to
the right of the parent object's left edge.
<DIV STYLE="position:absolute;left:100px">
<IMG SRC="cone.jpg"></DIV>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to change the position of two images when an
onclick event occurs.
<BUTTON onclick="cone.style.left='100px';
sphere.style.left='200px'">
. . .</BUTTON>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
A, ADDRESS, APPLET, B, BIG, BLOCKQUOTE, BUTTON, CENTER, CITE, CODE, currentStyle, custom, DD, DFN, DIR, DIV, DL, DT, EM, EMBED,
FIELDSET, FORM, Hn, HR, I, IFRAME, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password,
INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU,
OBJECT, OL, P, PRE, runtimeStyle, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE, TEXTAREA, TT, U, UL, VAR, XMP
See Also
pixelLeft, posLeft
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
outerText Property overflow-x Attribute | ov...
Web Workshop | DHTML, HTML & CSS
overflow Attribute | overflow Property
Sets or retrieves how to manage the content of the object when the content exceeds the
height and/or width of the object.
Syntax
Possible Values
The property is read/write with a default value of visible; the cascading style sheets
(CSS) attribute is not inherited.
For the TEXTAREA object, only the hidden value is valid. Setting the overflow
property to hidden on a TEXTAREA object hides its scroll bars.
Setting the overflow property to visible causes the content to clip to the size of the
window or frame that contains the object.
Example
The following examples use the overflow attribute and the overflow property to
manage content of the object.
This example uses an inline style to automatically adjust itself to overflowing content
when the page is loaded.
This example allows the user to dynamically change the overflow property of a DIV
object by choosing one of the possible overflow values from a SELECT object.
<SCRIPT>
function SetOverflow(o, sValue)
{
o.style.overflow = sValue;
}
</SCRIPT>
<DIV ID="div1"
STYLE="font-size:18pt;background-
color:yellow;height:50px;width:75px">
The quick brown fox jumped over the lazy dog.
</DIV>
<SELECT onchange="SetOverflow(div1,
this.options[this.selectedIndex].text)">
<OPTION SELECTED>visible
<OPTION>scroll
<OPTION>hidden
<OPTION>auto
</SELECT>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
A, ACRONYM, ADDRESS, APPLET, B, BDO, BIG, BLOCKQUOTE, BODY, CENTER, CITE, CODE, currentStyle, custom, DD, DEL, DFN, DIR, DIV, DL, DT,
EM, EMBED, FIELDSET, FONT, FORM, Hn, I, INS, KBD, LABEL, LEGEND, LI, LISTING, MENU, OL, P, PLAINTEXT, PRE, Q, RT, RUBY, runtimeStyle, S,
SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE, TD, TEXTAREA, TT, U, UL, VAR, XMP
See Also
Syntax
HTML { overflow-x:sOverflow }
Scripting object.style.overflowX [ =sOverflow ]
Possible Values
The property is read/write with a default value of visible; the proposed cascading
style sheets (CSS) extension attribute is not inherited.
For the TEXTAREA object, only the hidden value is valid. Setting the property to
hidden on a TEXTAREA object hides its scroll bars.
Applies To
A, ACRONYM, ADDRESS, APPLET, B, BDO, BIG, BLOCKQUOTE, BODY, CENTER, CITE, CODE, currentStyle, custom, DD, DEL, DFN, DIR, DIV, DL, DT,
EM, EMBED, FIELDSET, FONT, FORM, Hn, I, IFRAME, INS, KBD, LABEL, LEGEND, LI, LISTING, MENU, OL, P, PLAINTEXT, PRE, Q, RT, RUBY,
runtimeStyle, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE, TEXTAREA, TT, U, UL, VAR, XMP
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
overflow-x Attribute | ov... owningElement Prop
Web Workshop | DHTML, HTML & CSS
overflow-y Attribute | overflowY Property
Sets or retrieves how to manage the content of the object when the content exceeds the
height of the object.
Syntax
HTML { overflow-y:sOverflow }
Scripting object.style.overflowY [ =sOverflow ]
Possible Values
The property is read/write with a default value of visible; the proposed cascading
style sheets (CSS) extension attribute is not inherited.
For the TEXTAREA object, only the hidden value is valid. Setting the property to
hidden on a TEXTAREA object hides its scroll bars.
Applies To
A, ACRONYM, ADDRESS, APPLET, B, BDO, BIG, BLOCKQUOTE, BODY, CENTER, CITE, CODE, currentStyle, custom, DD, DEL, DFN, DIR, DIV, DL, DT,
EM, EMBED, FIELDSET, FONT, FORM, Hn, I, IFRAME, INS, KBD, LABEL, LEGEND, LI, LISTING, MENU, OL, P, PLAINTEXT, PRE, Q, RT, RUBY,
runtimeStyle, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE, TEXTAREA, TT, U, UL, VAR, XMP
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
posHeight Property posLeft Property DHTML P
Web Workshop | DHTML, HTML & CSS
position Attribute | position Property
Retrieves the type of positioning used for the object.
Syntax
Possible Values
The property is read-only with a default value of static; the cascading style sheets
(CSS) attribute is not inherited.
Remarks
Setting the property to absolute pulls the object out of the "flow" of the document
and positions it regardless of the layout of surrounding objects. If other objects already
occupy the given position, they do not affect the positioned object, nor does the
positioned object affect them. Instead, all objects are drawn at the same place,
causing the objects to overlap. This overlap is controlled by using the z-index attribute
or property. Absolutely positioned objects do not have margins, but they do have
borders and padding.
Setting the property to relative places the object in the natural HTML flow of the
document, but offsets the position of the object based on the preceding content. The
following syntax shows how to create superscript text by placing the text in a SPAN
that is positioned relative to the remaining text in the paragraph.
Text and objects that follow a relatively positioned object occupy their own space and
do not overlap the natural space for the positioned object. In contrast, text and objects
that follow an absolutely positioned object occupy what would have been the natural
space for the positioned object before it was pulled out of the flow.
The size of the content determines the size of objects with layout. For example, setting
the height and position properties on a DIV object gives it layout. The content of the
DIV determines the size. In this case, the content determines the size of the width.
For an overview about how to use dynamic positioning, see positioning .
I
See the Applies To section for elements that can be relatively and absolutely
positioned.
Example
This examples uses the position property's absolute, static, and relative values
to change the position of the text.
Applies To
A, ADDRESS, APPLET, B, BDO, BIG, BLOCKQUOTE, BUTTON, CENTER, CITE, CODE, custom, DD, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET,
FORM, Hn, HR, I, IFRAME, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT
type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, OBJECT, OL,
P, PRE, RUBY, runtimeStyle, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE, TD, TEXTAREA, TH, TR, TT, U, UL, VAR,
XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
right Property RIGHTMARGIN Attribute | r... D
Web Workshop | DHTML, HTML & CSS
right Attribute | right Property
Sets or retrieves the position of the object relative to the right edge of the next positioned
object in the document hierarchy.
Syntax
Possible Values
The property is read/write with a default value of auto; the cascading style sheets
(CSS) attribute is not inherited.
Only use the right attribute when the position attribute is set; otherwise, the value of
the right attribute is ignored.
You cannot use the right property in script to calculate the position of the object in the
document, because the value of the right property is a string. Instead, use the
pixelRight property or the posRight property.
For more information about how to access the dimension and location of objects on the
page through the document object model, see measuring element dimension and
location .
I
Example
This example uses the right attribute to set a DIV object 50 pixels from the right of
the client area.
Applies To
A, ADDRESS, APPLET, B, BIG, BLOCKQUOTE, BUTTON, CENTER, CITE, CODE, currentStyle, DD, DFN, DIR, DIV, DL, FIELDSET, FORM, Hn, HR, I,
IFRAME, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT
type=reset, INPUT type=submit, INPUT type=text, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PRE,
runtimeStyle, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE, TEXTAREA, TT, U, UL, VAR, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
toElement Property top Property DHTML Prop
Web Workshop | DHTML, HTML & CSS
top Attribute | top Property
Sets or retrieves the position of the object relative to the top of the next positioned object
in the document hierarchy.
Syntax
Possible Values
The property is read/write with a default value of auto; the CSS attribute is not
inherited.
The top attribute should be used only when the position attribute is set; otherwise, the
value of the top attribute is ignored.
Because the value of the top property is a string, you cannot use the property in script
to calculate the position of the object in the document; instead, use the pixelTop or the
posTop property.
For more information about how to access the dimension and location of objects on the
page through the document object model, see measuring element dimension and
location .
I
Example
The following examples use the top attribute and the top property to change the
position of the object.
This example uses an inline style to set the position of a DIV object.
<DIV STYLE="position:absolute;top:100px">
. . . </DIV>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline script to change the position of the image set by an inline
style. The change occurs during onmouseover and onmouseout events.
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
A, ADDRESS, APPLET, B, BIG, BLOCKQUOTE, BUTTON, CENTER, CITE, CODE, currentStyle, custom, DD, DFN, DIR, DIV, DL, DT, EM, EMBED,
FIELDSET, FORM, Hn, HR, I, IFRAME, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password,
INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU,
OBJECT, OL, P, PRE, runtimeStyle, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE, TEXTAREA, TT, U, UL, VAR, XMP
See Also
pixelTop, posTop
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
vertical-align Attribute ... visited Pseudo-class
Web Workshop | DHTML, HTML & CSS
visibility Attribute | visibility Property
Sets or retrieves whether the content of the object is displayed.
Syntax
Possible Values
The property is read/write with a default value of inherit; the cascading style sheets
(CSS) attribute is not inherited unless the value is set to inherit.
Unlike display:none, objects that are not visible still reserve the same physical space in
the content layout as they would if they were visible. You can change the visibility
through scripting to show and hide overlapping content based on user interaction. For
a child object to be visible, the parent object also must be visible. For document style
scripting information, see dynamic styles .
I
Example
The following examples use the visibility attribute and the visibility property to
determine whether the object is visible.
This example uses two calls to an embedded (global) style sheet to hide and then
show the image when the user moves the mouse over and off the text.
<STYLE>
.vis1 { visibility:visible }
.vis2 { visibility:hidden }
</STYLE>
</HEAD>
<BODY>
<IMG ID="oSphere" SRC="sphere.jpg">
<P onmouseover="oSphere.className='vis2'"
onmouseout="oSphere.className='vis1'">
Move the mouse over this text to make the sphere
disappear.</P>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
<SCRIPT>
function disappear()
{
oSphere.style.visibility="hidden";
}
function reappear()
{
oSphere.style.visibility="visible";
}
</SCRIPT>
</HEAD>
<BODY>
<IMG SRC="sphere.jpeg" ID="oSphere">
Move the mouse over <SPAN ID="oTxt" onmouseover="disappear()"
onmouseout="reappear()"> this text</SPAN>
to see the sphere disappear.
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
A, ADDRESS, APPLET, B, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, currentStyle, custom, DD, DFN,
DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FORM, Hn, HR, HTML, I, IFRAME, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file,
INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, ISINDEX, KBD, LABEL,
LEGEND, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PRE, runtimeStyle, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP,
TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
WIDTH Attribute | width P... word-break Attribu
Web Workshop | DHTML, HTML & CSS
width Attribute | width Property
Sets or retrieves the width of the object.
Syntax
Possible Values
The property is read/write with a default value of auto; the cascading style sheets
(CSS) attribute is not inherited.
If you specify the width property of an IMG, but not the height property, the resulting
height of the IMG is sized proportionally to the specified width property and the
actual height, in pixels, of the source image file. Consider the following example:
If you specify the width property of an IMG, and the height and width of the image in
the source file are identical, the height of the image matches the width.
If you specify the height property and the width property of an IMG, the resulting
image dimensions match the height and width specified.
Percentage values refer to the parent object's width. Negative values are not allowed.
The following examples use the width attribute and the width property to change the
width of the object.
This example uses an inline style sheet to set the width of an image.
<DIV STYLE="position:absolute;top:10px;left:10px;width=1in">
. . . </DIV>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to set the width of an image when an onclick event
occurs.
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
A, ACRONYM, ADDRESS, APPLET, AREA, B, BASE, BASEFONT, BIG, BLOCKQUOTE, BODY, BR, BUTTON, CAPTION, CENTER, CITE, CODE, COL,
COLGROUP, COMMENT, currentStyle, custom, DD, DEL, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, FRAME, FRAMESET, HEAD,
Hn, HR, I, IFRAME, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT
type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, INS, KBD, LABEL, LEGEND, LI, LINK, MAP, MARQUEE, MENU, META, NEXTID,
NOBR, OBJECT, OL, OPTION, P, PLAINTEXT, PRE, Q, RT, RUBY, runtimeStyle, S, SAMP, SCRIPT, SELECT, SMALL, SPAN, STRIKE, STRONG, style,
SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TITLE, TR, TT, U, UL, VAR
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
y Property DHTML Properties
Web Workshop | DHTML, HTML & CSS
z-index Attribute | zIndex Property
Sets or retrieves the stacking order of positioned objects.
Syntax
Possible Values
Example
<IMG SRC="cone.jpg"
STYLE="position:absolute;
top:100; left:100; z-index:4">
<DIV STYLE="position:absolute; top:100;
left:100;
color:red; background-color:beige;
font-weight:bold;
z-index:1">
. . . </DIV>
STYLE="position:absolute;top:10px;left:10px
;"
onclick="cone.style.zIndex=1;
sphere.style.zIndex=2">
<IMG ID="sphere" SRC="sphere.jpg"
STYLE="position:absolute;top:1px;left:1px;"
onclick="cone.style.zIndex=2;
sphere.style.zIndex=1">
This feature requires Internet Explorer 4.0 or later. Click
the icon below to install the latest version. Then reload
this page to view the sample.
Applies To
A, ADDRESS, APPLET, B, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE,
COL, COLGROUP, currentStyle, custom, DD, DFN, DIR, DIV, DL, DT, EM, FIELDSET, FORM, I,
INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT
type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text,
ISINDEX, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, OL, P, PLAINTEXT, PRE,
runtimeStyle, S, SAMP, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE, TBODY, TD,
TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
padding-top Attribute | p... page-break-before
Web Workshop | DHTML, HTML & CSS
page-break-after Attribute | pageBreakAfter Property
Sets or retrieves whether a page break occurs after the object.
Syntax
Possible Values
The property is read/write with a default value of auto; the cascading style sheets
(CSS) attribute is not inherited.
If there are conflicts between this property and the pageBreakBefore value on the
object previously displayed in the browser, the value that results in the largest number
of page breaks is used.
Example
The following examples use the page-break-after attribute and the pageBreakAfter
property to start printing on a new page.
This example uses the P element as a selector in an embedded style sheet to break the
page at the end of all paragraphs.
<STYLE>
P { page-break-after: always }
</STYLE>
</HEAD>
<BODY>
<P>
:
</P>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses a call to a function to turn off the page break after the object that
has an id value of idParagraph.
<SCRIPT>
function offBreak()
{
idParagraph.style.pageBreakAfter="";
}
</SCRIPT>
</HEAD>
<BODY>
<BUTTON onClick="offBreak()">Turn off break</BUTTON>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
BLOCKQUOTE, BODY, BUTTON, CENTER, currentStyle, DD, DIR, DIV, DL, DT, FIELDSET, FORM, Hn, ISINDEX, LI, LISTING, MARQUEE, MENU, OL, P,
PLAINTEXT, PRE, runtimeStyle, style, TABLE, TD, TR, UL, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
page-break-after Attribut... palette Property D
Web Workshop | DHTML, HTML & CSS
page-break-before Attribute | pageBreakBefore Property
Sets or retrieves whether a page break occurs before the object.
Syntax
Possible Values
The property is read/write with a default value of auto; the cascading style sheets
(CSS) attribute is not inherited.
If there are conflicts between this property and the pageBreakAfter value object
previously displayed in the browser, the value that results in the largest number of
page breaks is used.
Example
This example uses the H3 element as a selector in an embedded style sheet to break
the page before all H3 headings.
<STYLE>
H3 { page-break-before: always }
</STYLE>
</HEAD>
<BODY>
<H3>Start New Section on New Page</H3>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses a call to a function to turn off the page break before the object that
has an id value of idParagraph. When the page is printed, a page break occurs before
the first paragraph unless the user clicks the Turn Off Break button.
<SCRIPT>
function offBreak()
{
idParagraph.style.pageBreakBefore="";
}
</SCRIPT>
</HEAD>
<BODY>
<BUTTON onClick="offBreak()">Turn off break</BUTTON>
<P ID="Paragraph" STYLE="page-break-before:always">
:
</P>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
BLOCKQUOTE, BODY, BUTTON, CENTER, currentStyle, DD, DIR, DIV, DL, DT, FIELDSET, FORM, Hn, ISINDEX, LI, LISTING, MARQUEE, MENU, OL, P,
PLAINTEXT, PRE, runtimeStyle, style, TABLE, TD, TR, UL, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
fileUpdatedDate Property firstChild Property D
Web Workshop | DHTML, HTML & CSS
filter Attribute | filter Property
Sets or retrieves the filter or collection of filters applied to the object.
Syntax
Possible Values
The property is read/write with no default value; the proposed cascading style sheets
(CSS) extension attribute is not inherited.
When using a SPAN or DIV object, be sure to specify at least one of the three required
CSS attributes: height, width, or position (absolute or relative).
The shadow filter can be applied to the IMG object by setting the filter on the image's
parent container.
For more information about filters, see creating multimedia effects with visual filters
and transitions . The filter mechanism is extensible and allows you to develop and add
I
additional filters later.
Example
The following examples use the filter attribute and the filter property to apply filters.
This example uses an inline style sheet to set the filter on an image.
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
BODY, BUTTON, custom, DIV, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT
type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, MARQUEE, runtimeStyle, SPAN, style, TABLE, TD, TEXTAREA, TH
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
ACTION Attribute | action... activeElement Prop
Web Workshop | DHTML, HTML & CSS
active Pseudo-class
Sets the style of anchor when the link is engaged or active.
Syntax
Possible Values
Active means that the user currently is navigating the link. The active pseudo-class is
often used to set specific styles for the other states of a link: link, visited, and hover.
Using pseudo-classes on objects other than the A object has no effect.
Example
This example uses the active pseudo-class to set the attributes of the active link.
Applies To
HTML A
Scripting N/A
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
ctrlKey Property DATA Attribute | data Pro...
Web Workshop | DHTML, HTML & CSS
cursor Attribute | cursor Property
Sets or retrieves the type of cursor to display as the mouse pointer moves over the object.
Syntax
Possible Values
The property is read/write with a default value of auto; the cascading style sheets
(CSS) attribute is inherited.
The following examples use the cursor attribute and the cursor property to change
the cursor as it passes over an object.
This example uses a call to an embedded (global) style sheet to set the cursor to hand
as the cursor passes over all paragraphs.
<STYLE>
P { cursor:hand }
</STYLE>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
This example uses inline scripting to set the cursor to hand as the cursor passes over
the paragraph.
<P onmouseover="this.style.cursor='hand'">
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
A, ADDRESS, APPLET, B, BIG, BLOCKQUOTE, BODY, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, currentStyle, custom, DD, DFN, DIR, DIV,
DL, DT, EM, EMBED, FIELDSET, FORM, Hn, HR, HTML, I, IFRAME, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT
type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, KBD, LABEL, LEGEND, LI,
LISTING, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, runtimeStyle, S, SAMP, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE,
TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
hostname Property href Property DHTML Prop
Web Workshop | DHTML, HTML & CSS
hover Pseudo-class
Sets the style of the anchor when the user hovers the mouse over the links.
Syntax
Possible Values
Hover means that the user has the mouse positioned over the link and has hesitated.
If the user simply passes the mouse over the link, the style does change. The hover
pseudo-class is often used with specific styles for the other states of a link: active,
link, and visited.
The syntax in the following example uses a colon (:) to specify a pseudo-class.
Example
This example sets the style of an anchor. When the user hovers the mouse over a
hyperlink to which the following style sheet has been applied, the text displays in red,
converts to uppercase, and is spaced 1 centimeter apart.
<STYLE>
A:hover { color:red; text-transform:uppercase; letter-
spacing:1cm }
</STYLE>
Applies To
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
@font-face Rule @media Rule DHTML Propert
Web Workshop | DHTML, HTML & CSS
@import Rule
Imports an external style sheet.
Syntax
Possible Values
sUrl String that specifies the URL that references a cascading style sheet.
The semicolon in the syntax is required; if omitted, the style sheet is not imported
properly and an error message is generated.
The @import rule, like the LINK element, links an external style sheet to a document.
This helps the Web author establish a consistent "look" across multiple HTML pages.
Whereas the LINK element specifies the name of the style sheet to import using its
HREF attribute, the @import rule specifies the style sheet definition inside a LINK or
a STYLE tag. In the scripting model, this means the owningElement property of the
style sheet defined through the @import rule is either a STYLE or a LINK object.
The @import rule should occur at the start of a style sheet, before any declarations.
Although Internet Explorer 4.0 allows @import statements to appear anywhere within
the style sheet definition, the rules contained within the @import style sheet are
applied to the document before any other rules defined for the containing style sheet.
This rule order affects expected rendering.
Rules in the style sheet override rules in the imported style sheet.
Example
This example uses the @import rule to import a style sheet located at
http://anotherStyleSheet.css.
<STYLE type="css/text">
@import url(http://anotherStyleSheet.css);
P {color:blue}
</STYLE>
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
@charset Rule DHTML Properties
Web Workshop | DHTML, HTML & CSS
!important Declaration
Increases the weight or importance of a particular rule.
Syntax
HTML { sAttribute:sValue!important }
Scripting N/A
Possible Values
<STYLE>
P {color:red!important}
</STYLE>
<P STYLE="color:green">This will be red.</P>
Applies To
A, ADDRESS, B, BIG, BLOCKQUOTE, BODY, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, DD, DFN, DIR,
DIV, DL, DT, EM, FIELDSET, FORM, Hn, HTML, I, IMG, INPUT type=button, INPUT type=checkbox, INPUT
type=file, INPUT type=hidden, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT
type=reset, INPUT type=submit, INPUT type=text, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, OL,
P, PLAINTEXT, PRE, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD,
TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
line-height Attribute | l... LINK Attribute | link P
Web Workshop | DHTML, HTML & CSS
link Pseudo-class
Sets or retrieves the style of the <A> element for the default state of the link.
Syntax
Possible Values
The link pseudo-class often is set with specific styles for the other states—active,
visited, and hover—of a link.
Internet Explorer 3.0 applies the link pseudo-class value to the visited psuedo-class.
Example
<STYLE>
A:link{ color: #FF0000 } // unvisited link
A:visited { color: #CFCFCF } // visited links
</STYLE>
Applies To
See Also
hover, visited
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
visibility Attribute | vi... VLINK ATTRIBUTE | vL
Web Workshop | DHTML, HTML & CSS
visited Pseudo-class
Sets the style of the anchor for previously visited links.
Syntax
Possible Values
The visited pseudo-class often is used with the active, link, and hover pseudo-
elements to define the various states of a link.
Example
This example sets unvisited links to red and visited links to blue, and uses a colon (:)
to specify a pseudo-class.
Applies To
HTML A
Scripting N/A
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
cloneNode Method close Method DHTML Meth
Web Workshop | DHTML, HTML & CSS
close Method
Closes the current browser window or HTML Application (HTA).
Syntax
window.close()
Return Value
No return value.
Remarks
The way that you close a window programmatically determines whether the user gets
prompted. If you invoke the close method on a window that you did not open with
script, the user sees a confirm dialog box. This also happens if you use close to exit
the last running instance of Microsoft® Internet Explorer. You can only use the close
method silently with HTAs. In the case of HTAs, the application is trusted and follows a
different security model.
When a function fired by an event on the BODY object calls the close method, the
window.close method is implied. When an event on the BODY object calls the close
method, the document.close method is implied.
Applies To
window
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
top Attribute | top Prope... top Property DHTM
Web Workshop | DHTML, HTML & CSS
top Property
Retrieves the topmost ancestor window, which is its own parent.
Syntax
HTML N/A
Scripting [ oTop = ] window.top
Possible Values
Applies To
HTML N/A
Scripting window
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
selectorText Property SHAPE Attribute | shape
Web Workshop | DHTML, HTML & CSS
self Property
Retrieves a reference to the current window or frame.
Syntax
HTML N/A
Scripting [ oSelf = ] object.self
Possible Values
Remarks
You can use the property to explicitly refer to the current window or frame. To improve
scripting efficiency, you also can use it to make implicit window references explicit.
Applies To
FRAME, window
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
recordset Property REL Attribute | rel Prope...
Web Workshop | DHTML, HTML & CSS
referrer Property
Retrieves the URL of the location that referred the user to the current page.
Syntax
HTML N/A
Scripting [ sUrl= ] document.referrer
Possible Values
Remarks
This property returns a value only when the user reaches the current page through a
link from the previous page. Otherwise, document.referrer returns an empty string;
it also returns an empty string when the link is from a secure site.
For example, if PageA.htm includes a link to PageB.htm, and the user clicks that link,
the document.referrer on PageB.htm returns "PageA.htm". However, if the user is on
PageA.htm and types PageB.htm into the address line or uses Open in the File menu to
get to PageB.htm, the document.referrer returns an empty string.
Applies To
HTML N/A
Scripting document
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
onLine Property outerHTML Property DHTML P
Web Workshop | DHTML, HTML & CSS
opener Property
Sets or retrieves a reference to the window that created the current window.
Syntax
HTML N/A
Scripting window.opener [ =sWindow ]
Possible Values
HTML N/A
Scripting window
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
href Property HREF Attribute | href Pro... DHT
Web Workshop | DHTML, HTML & CSS
HREF Attribute | href Property
Sets or retrieves the destination URL or anchor point.
Syntax
Possible Values
When an anchor is specified, the link to that address is represented by the text
between the opening and closing anchor tags.
Applies To
A, AREA, LINK
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
NAME Attribute | name Pro... nameProp Proper
Web Workshop | DHTML, HTML & CSS
NAME Attribute | name Property
Sets or retrieves the name of the control, bookmark, or application.
Syntax
Possible Values
When submitting a FORM, use the name property to bind the value of the control. The
name is not the value displayed for the button, reset, and submit input types. The
internally stored value, not the displayed value, is the one submitted with the form.
Microsoft® JScript® (compatible with ECMA 262 language specification) allows the
name to be changed at run time. This does not cause the name in the programming
model to change in the collection of elements, but it does change the name used for
submitting elements.
In Internet Explorer 5, the name property cannot be set at run time on anchor objects
dynamically created with the createElement method. To create an anchor with a
NAME attribute, include the attribute and value when using the createElement
method, or use the innerHTML property.
Example
Applies To
A, APPLET, BUTTON, FORM, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=hidden, INPUT type=image, INPUT
type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, LINK, MAP, OBJECT, PARAM, RT, RUBY, SELECT,
TEXTAREA
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
Web Workshop | DHTML, HTML & CSS
A Element | A Object Members
Designates the start or destination of a hypertext link.
Properties
Methods
Collections
Behaviors
Styles
widthpadding-rightpaddingcursorvisibilityfont-styletext-
autospaceleftoverflow-xfont-variantoverflow-
ylinkbackgrounddirectionpositionbackground-
positionclearvisitedword-spacingtoppadding-
lefthoverlayout-grid-modepadding-bottomrightfont-
sizeoverflowletter-spacingdisplayfloatfont-
familyactivebehaviorbackground-repeattext-
transformbackground-imagebottomcliptext-
decorationcolorz-indexfontfont-weightbackground-
colorunicode-bidiline-heightlayout-gridpadding-top
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Web Workshop | DHTML, HTML & CSS
ACRONYM Element | ACRONYM Object
Members
Indicates an acronym abbreviation.
Properties
Methods
Events
Collections
Behaviors
Styles
widthdirectionoverflowpadding-
rightdisplaypaddingunicode-bidibehaviorpadding-
leftlayout-gridlayout-grid-modetext-autospacepadding-
topoverflow-xpadding-bottomoverflow-y
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Web Workshop | DHTML, HTML & CSS
ADDRESS Element | ADDRESS Object
Members
Specifies information, such as address, signature, and
authorship, of the current document.
Properties
Methods
Collections
Behaviors
Styles
widthfont-sizeoverflowpadding-rightletter-
spacingfloatdisplaypaddingfont-
familycursorbehaviorword-breaktext-
transformbackground-repeatbackground-
imagebottomvisibilityfont-stylecliptext-
autospaceleftoverflow-xfont-varianttext-
decorationoverflow-yline-
breakbackgroundcolordirectionz-indextext-
justifypositionbackground-positionclearfontunicode-
bidibackground-colorfont-weightword-spacingline-
heighttoppadding-leftlayout-gridlayout-grid-
modepadding-toppadding-bottomright
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Web Workshop | DHTML, HTML & CSS
APPLET Element | APPLET Object Members
Places executable content on the page.
Properties
Methods
Events
onbeforecut , onbeforeeditfocus , onbeforepaste , onblur
, oncellchange , onclick , oncontextmenu , oncut ,
ondataavailable , ondatasetchanged ,
ondatasetcomplete , ondblclick , onfocus , onhelp ,
onkeydown , onkeypress , onkeyup , onload ,
onlosecapture , onmousedown , onmousemove ,
onmouseout , onmouseover , onmouseup , onpaste ,
onpropertychange , onreadystatechange , onresize ,
onrowenter , onrowexit , onrowsdelete , onrowsinserted
, onscroll
Collections
Behaviors
Styles
widthfont-sizeoverflowpadding-
rightfloatdisplaypaddingcursorbehaviorbottomvisibilitycli
ptext-autospaceleftoverflow-xoverflow-ycolorz-
indexpositioncleartoppadding-leftlayout-gridlayout-grid-
modeheightpadding-toppadding-bottomright
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
cookieEnabled Property cpuClass Property DH
Web Workshop | DHTML, HTML & CSS
COORDS Attribute | coords Property
Sets or retrieves the coordinates of a hyperlink AREA within an image MAP.
Syntax
Possible Values
sCoords String that specifies the coordinates. The format of this string depends on the value of the SHAPE attribute of the AREA element. For
details, see the Remarks section.
The format of sCoords depends on the value of the SHAPE attribute as follows:
SHAPE= "circ" or COORDS= "x1,y1,r" – Where x1,y2 are the coordinates of the center of the circle, and r is the radius of the circle.
"circle"
SHAPE= "poly" or COORDS= "x1,y1,x2,y2...xn,yn" – Where each x,y pair contains the coordinates of one vertex of the polygon.
"polygon"
SHAPE= "rect" or COORDS= "x1,y1,x2,y2" – Where x1,y1 are the coordinates of the upper-left corner of the rectangle and x2,y2 are the
"rectangle" coordinates of the lower-right coordinates of the rectangle.
Example
This example provides the full code for an image map of the solar system. Clicking on
the sun or any planet links to an individual image. The user can click the Back button
from the image to return to the solar system image map.
Applies To
AREA
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
self Property shiftKey Property DHTML Proper
Web Workshop | DHTML, HTML & CSS
SHAPE Attribute | shape Property
Sets or retrieves the shape of a hyperlink AREA in an image MAP.
Syntax
Possible Values
The value of the SHAPE attribute determines the format of the COORDS attribute.
This example provides the full code for an image map of the solar system. When you
click on the sun or any planet, you will link to the image associated with the x,y
coordinate. You can click the Back button from the image to return to the solar system
image map.
Applies To
AREA
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
Web Workshop | DHTML, HTML & CSS
AREA Element | AREA Object Members
Defines the shape, coordinates, and associated URL of one
hyperlink region within a client-side image MAP.
Properties
Methods
Events
onbeforecopy , onbeforecut , onbeforeeditfocus ,
onbeforepaste , onblur , onclick , oncontextmenu ,
oncopy , oncut , ondblclick , ondrag , ondragend ,
ondragenter , ondragleave , ondragover , ondragstart ,
ondrop , onfocus , onhelp , onkeydown , onkeypress ,
onkeyup , onlosecapture , onmousedown ,
onmousemove , onmouseout , onmouseover ,
onmouseup , onpaste , onpropertychange ,
onreadystatechange , onselectstart
Collections
Behaviors
Styles
widthdirectionunicode-bidibehaviorlayout-gridlayout-
grid-modetext-autospace
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
areas Collection behaviorUrns Collection DHT
Web Workshop | DHTML, HTML & CSS
attributes Collection
Retrieves a collection of attributes of the object.
Syntax
[ collAttributes = ] object.attributes
[ oObject = ] object.attributes(iIndex)
Possible Values
Members
Remarks
The attributes collection does not include expando properties. To access the expando
properties of an object, use the JScript® (compatible with ECMA 262 language
specification) for...in construct.
The attributes collection does not expose the style object. Use the cssText property of
the object's style property to retrieve the persistent representation of the cascading
styles associated with an object.
Unlike other DHTML collections, such as all and children, the attributes collection is
static. Modifications to the properties of an object are not automatically reflected by an
existing reference to the attributes collection of that object.
Example
This example shows how to iterate through the collection of attributes of the specified
object, displaying the name and value of the attributes as well as the language of the
attribute (HTML or script).
<SCRIPT>
function ShowAttribs(oElem)
{
txtAttribs.innerHTML = '';
Applies To
A, ACRONYM, ADDRESS, APPLET, AREA, B, BASE, BASEFONT, BDO, BGSOUND, BIG, BLOCKQUOTE, BODY, BR, BUTTON, CAPTION, CENTER, CITE,
CODE, COL, COLGROUP, COMMENT, DD, DEL, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, FRAME, FRAMESET, HEAD, Hn, HR,
HTML, I, IFRAME, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=hidden, INPUT type=image, INPUT
type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, INS, KBD, LABEL, LEGEND, LI, LINK, LISTING, MAP,
MARQUEE, MENU, NEXTID, OBJECT, OL, OPTION, P, PLAINTEXT, PRE, Q, S, SAMP, SCRIPT, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP,
TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TITLE, TR, TT, U, UL, VAR, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
EVENT Attribute | event P... FACE Attribute | fa
Web Workshop | DHTML, HTML & CSS
expando Property
Sets or retrieves whether arbitrary variables can be created within an object.
Syntax
HTML N/A
Scripting document.expando [ =bExpand ]
Possible Values
You can extend the properties on an object by creating arbitrary properties with
values. You should be careful, however, because you can unintentionally set a property
value when scripting in a case-sensitive language such as Microsoft® JScript®
(compatible with ECMA 262 language specification). For example, if the property value
is borderColor and you type the value "bordercolor = 'blue'", you have, in fact, created
another property on the style object called bordercolor with the value 'blue'. If you
query the value of the property, the value "blue" is returned. However, the borders for
the element do not turn blue.
Microsoft® Visual Basic® Scripting Edition (VBScript) does not support expando
properties on its native language objects, nor does it cause Microsoft® Internet
Explorer to create expando properties on its objects. Internet Explorer supports
creation of expando properties on its objects, in any language, through setAttribute.
Applies To
HTML N/A
Scripting document
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
Web Workshop | DHTML, HTML & CSS
Attribute Object Members
Represents an attribute or property of an HTML element as
an object.
Properties
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
SPAN Attribute | span Pro... S SRC Attribute | src
Web Workshop | DHTML, HTML & CSS
specified Property
Retrieves whether an attribute has been specified.
Syntax
HTML N/A
Scripting [ bSpecified = ] object.specified
Possible Values
Remarks
Example
This example uses the specified property to determine the attributes set for an
object. The function checks each attribute, and lists all of the attributes of the object
and the value of each attribute. In addition, each attribute that is set is displayed.
<SCRIPT>
function fnFindSpecified(){
var oAttributes=oList.attributes;
alert(oAttributes(0).nodeName);
for(var i=0;i<oAttributes.length;i++){
var oNode=document.createElement("LI");
var oNodeValue=document.createTextNode(i + " "
+ oAttributes(i).nodeName + " = "
+ oAttributes(i).nodeValue);
oList.appendChild(oNode);
oNode.appendChild(oNodeValue);
if(oAttributes(i).nodeValue!=null){
alert(oAttributes(i).nodeName
+ " specified: " + oAttributes(i).specified);
}
}
}
</SCRIPT>
Attribute
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
Web Workshop | DHTML, HTML & CSS
B Element | B Object Members
Specifies that the text should be rendered in bold.
Properties
Methods
Events
onbeforecopy , onbeforecut , onbeforepaste , onblur ,
onclick , oncontextmenu , oncopy , oncut , ondblclick ,
ondrag , ondragend , ondragenter , ondragleave ,
ondragover , ondragstart , ondrop , onfocus , onhelp ,
onkeydown , onkeypress , onkeyup , onlosecapture ,
onmousedown , onmousemove , onmouseout ,
onmouseover , onmouseup , onpaste ,
onpropertychange , onreadystatechange , onresize ,
onselectstart
Collections
Behaviors
Styles
widthfont-sizeoverflowpadding-rightletter-
spacingfloatdisplaypaddingfont-
familycursorbehaviortext-transformbackground-
repeatbackground-imagebottomvisibilityfont-
stylecliptext-autospaceleftoverflow-xfont-varianttext-
decorationoverflow-ybackgroundcolordirectionz-
indexpositionbackground-positionclearfontunicode-
bidibackground-colorfont-weightword-spacingline-
heighttoppadding-leftlayout-gridlayout-grid-
modepadding-toppadding-bottomright
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Web Workshop | DHTML, HTML & CSS
BASE Element | BASE Object Members
Specifies an explicit URL used to resolve links and
references to external sources such as images and style
sheets.
Properties
Methods
Events
onreadystatechange
Collections
Styles
widthbehaviorlayout-gridlayout-grid-modetext-
autospace
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Web Workshop | DHTML, HTML & CSS
BASEFONT Element | BASEFONT Object
Members
Sets a base font value to be used as the default font when
rendering text.
Properties
Methods
Events
onreadystatechange
Collections
Styles
widthfont-familybehaviorlayout-gridlayout-grid-
modetext-autospace
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
dialogWidth Property DIRECTION Attribute | dir
Web Workshop | DHTML, HTML & CSS
DIR Attribute | dir Property
Sets or retrieves the reading order of the object.
Syntax
Possible Values
A, ACRONYM, ADDRESS, AREA, B, BDO, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, custom, DD, DEL,
DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, Hn, I, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT
type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, INS, KBD, LABEL, LEGEND, LI,
LISTING, MAP, MARQUEE, MENU, NOBR, OBJECT, OL, OPTION, P, PLAINTEXT, PRE, Q, RT, RUBY, S, SAMP, SELECT, SMALL, SPAN, STRIKE,
STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP
See Also
direction
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
Web Workshop | DHTML, HTML & CSS
BDO Element | BDO Object Members
Allows authors to disable the bidirectional algorithm for
selected fragments of text.
Properties
Methods
Events
Collections
Behaviors
Styles
directionoverflowpositionpadding-
rightdisplaypaddingunicode-bidipadding-leftlayout-
gridcliplayout-grid-modepadding-toptext-
autospaceoverflow-xpadding-bottomoverflow-y
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Web Workshop | DHTML, HTML & CSS
BGSOUND Element | BGSOUND Object
Members
Enables pages with background sounds or soundtracks to be
created.
Properties
Methods
Events
onreadystatechange
Collections
Behaviors
clientCaps , download , homePage
Styles
behaviortext-autospace
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Web Workshop | DHTML, HTML & CSS
BIG Element | BIG Object Members
Specifies that the enclosed text should be displayed in a
larger font than the current font.
Properties
Methods
Collections
Behaviors
Styles
widthfont-sizeoverflowpadding-rightletter-
spacingfloatdisplaypaddingfont-
familycursorbehaviortext-transformbackground-
repeatbackground-imagebottomvisibilityfont-
stylecliptext-autospaceleftoverflow-xfont-varianttext-
decorationoverflow-ybackgroundcolordirectionz-
indexpositionbackground-positionclearfontunicode-
bidibackground-colorfont-weightword-spacingline-
heighttoppadding-leftlayout-gridlayout-grid-
modepadding-toppadding-bottomright
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Web Workshop | DHTML, HTML & CSS
BLOCKQUOTE Element | BLOCKQUOTE
Object Members
Sets apart a quotation in text.
Properties
Methods
Collections
Behaviors
Styles
border-top-colorwidthmargin-topborder-bottom-
widthpage-break-beforepadding-rightpaddingborder-
right-widthcursortext-indentvisibilityfont-styleborder-
left-colormargin-lefttext-autospaceleftoverflow-xlayout-
grid-linefont-variantoverflow-yline-
breakbackgroundtext-aligndirectionborder-bottom-
colortext-justifypositionbackground-positionclearborder-
right-colorborder-rightword-spacingtoppadding-
leftlayout-grid-modepadding-bottomrightfont-
sizeborder-bottomoverflowletter-
spacingdisplayfloatfont-familymargin-
rightbehaviorword-breaktext-transformbackground-
repeatborder-top-stylelayout-grid-charbackground-
imagebottomcliptext-decorationcolorborder-styleborder-
top-widthborder-topz-indexmargin-bottompage-break-
afterfontborder-left-styleborder-widthmarginunicode-
bidibackground-colorfont-weightline-heightborder-
bottom-stylelayout-gridlayout-grid-typelayout-grid-
char-spacingborder-left-widthborder-leftpadding-
topborder-colorborder-right-styleborder
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
onbeforeupdate Event onbounce Event DHTM
Web Workshop | DHTML, HTML & CSS
onblur Event
Fires when the object loses the input focus.
Syntax
Remarks
Bubbles No
Cancels No
To invoke Cause an object to lose focus:
Click the mouse on the document background or another control.
Use the keyboard to navigate from one object to the next.
Invoke the blur method when an object has focus.
Switch focus to a different application or open a second browser window.
Default action Switches focus away from the object on which the event is fired.
The onblur event fires on the original object before the onfocus or onclick event fires
on the object that is receiving focus. Where applicable, the onblur event fires after the
onchange event.
Use the focus events to determine when to prepare an object to receive or validate
input from the user.
As of Microsoft® Internet Explorer 5, you must set the TABINDEX attribute of elements
that expose the onblur event.
Although event handlers in the document object model do not receive parameters
directly, the handler can query the event object for data.
Example
This example shows how to display the name of the object that has lost focus—that is,
the object that fires the onblur event.
<HTML>
<BODY>
<INPUT TYPE=text NAME=txtFName VALUE="First Name"
onblur="alert(event.srcElement.name)">
<INPUT TYPE=text NAME=txtLName VALUE="Last Name"
onblur="alert(event.srcElement.name)">
<INPUT TYPE=text NAME=txtPhone VALUE="Phone"
onblur="alert(event.srcElement.name)">
</BODY>
</HTML>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
A, ACRONYM, ADDRESS, APPLET, AREA, B, BDO, BIG, BLOCKQUOTE, BUTTON, CAPTION, CENTER, CITE, custom, DD, DEL, DFN, DIR, DIV, DL, DT,
EM, EMBED, FIELDSET, FONT, FORM, FRAME, FRAMESET, Hn, HR, I, IFRAME, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file,
INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, INS, ISINDEX, KBD,
LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, Q, RT, RUBY, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG,
SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, window, XMP
See Also
blur, focus
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
onfinish Event onhelp Event DHTML Events
Web Workshop | DHTML, HTML & CSS
onfocus Event
Fires when the object receives the focus.
Syntax
Remarks
Bubbles No
Cancels No
To invoke Give focus to an object:
Click an object.
Use keyboard navigation.
Invoke the focus method.
When one object loses focus and another object receives focus, the onfocus event
fires on the object receiving focus only after the onblur event fires on the object
losing focus. Use the focus events to determine when to prepare an object to receive
input from the user.
As of Microsoft® Internet Explorer 5, you can force elements that do not implicitly
receive focus to receive focus by adding them to the document tabbing order using
the TABINDEX attribute.
As of Internet Explorer 5, elements retain focus within the current browser history
when the user returns to a page. To avoid firing the onfocus event unintentionally for
an element when the document loads, invoke the focus method on another element.
Although event handlers in the document object model do not receive parameters
directly, the handler can query the event object for data.
Example
This example uses the onfocus event to make INPUT_text and LABEL objects more
accessible. When the INPUT_text object has focus, the onfocus event fires and the
backgroundColor, fontSize, and fontWeight properties are changed to give the control
more prominence.
Applies To
A, ACRONYM, ADDRESS, APPLET, AREA, B, BDO, BIG, BLOCKQUOTE, BUTTON, CAPTION, CENTER, CITE, custom, DD, DEL, DFN, DIR, DIV, DL,
DT, EM, EMBED, FIELDSET, FONT, FORM, FRAME, FRAMESET, Hn, HR, I, IFRAME, IMG, INPUT type=button, INPUT type=checkbox, INPUT
type=file, INPUT type=hidden, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT
type=text, INS, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, Q, RT, RUBY, S, SAMP, SELECT,
SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, window, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
onkeyup Event onlosecapture Event DHTML E
Web Workshop | DHTML, HTML & CSS
onload Event
Fires immediately after the browser loads the object.
Syntax
Remarks
Bubbles No
Cancels No
To invoke Open a page in the browser to invoke this event for the document or any object within it.
Default action Loads the object for which the event is specified.
The onload attribute of the BODY object sets an onload event handler for the
window. This technique of calling the window onload event through the BODY object
is overridden by any other means of invoking the window onload event, provided the
handlers are in the same script language.
Although event handlers in the DHTML Object Model do not receive parameters
directly, the handler can query the event object for data.
Example
This example uses an onload event handler to display a message in the window's
status bar when the page has finished loading.
<BODY>
<SCRIPT FOR=window EVENT=onload LANGUAGE="JScript">
window.status = "Page is loaded!";
</SCRIPT>
</BODY>
This example sets an onload event handler for an IMG object. The handler uses the
event object to retrieve the URL of the image.
<SCRIPT>
function imageLoaded()
{
window.status = "Image " + event.srcElement.src + " is
loaded";
}
</SCRIPT>
<BODY>
<IMG SRC="sample.gif" onload="imageLoaded()">
</BODY>
Applies To
See Also
onreadystatechange, onunload
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
onsubmit Event DHTML Events
Web Workshop | DHTML, HTML & CSS
onunload Event
Fires immediately before the object is unloaded.
Syntax
Remarks
Bubbles No
Cancels No
To
invoke Close the current browser window.
Navigate to another location by entering a new address or selecting a Favorite.
Click the Back, Forward, Refresh, or Home button.
Click on an anchor that refers the browser to another Web page.
Invoke the anchor click method.
Invoke the document write method.
Invoke the document open method.
Invoke the document close method.
Invoke the window close method.
Invoke the window open method, providing the possible value _self for the
window name.
Invoke the window navigate or NavigateAndFind method.
Invoke the location replace method.
Invoke the location reload method.
Specify a new value for the location href property.
Submit a FORM to the address specified in the ACTION attribute via the
INPUT_submit control, or invoke the form submit method.
<HEAD>
<SCRIPT FOR=window EVENT=onunload>
alert("The onunload event fired for the
window object.");
</SCRIPT>
<SCRIPT>
function fnRelocate()
{
location.href="/workshop/samples/author/dhtml
/refs/onunloadEX_target.htm";
}
</SCRIPT>
</HEAD>
<BODY>
<INPUT TYPE=button VALUE="Go To Page 2"
onclick="fnRelocate()">
<IMG ID=imgTest
SRC="/workshop/graphics/prop_rw.gif">
</BODY>
Applies To
FRAMESET, window
See Also
onload
Did you find this topic useful? Suggestions for other topics? write
us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
Web Workshop | DHTML, HTML & CSS
BODY Element | body Object Members
Specifies the beginning and end of the document body.
Properties
Methods
Events
Collections
Behaviors
Styles
border-top-colorwidthmargin-topborder-bottom-
widthpage-break-beforepadding-rightpaddingborder-
right-widthcursorfiltertext-indentvisibilityfont-
styleborder-left-colormargin-lefttext-autospaceoverflow-
xlayout-grid-linefont-variantoverflow-yline-
breakbackgroundtext-aligndirectionborder-bottom-
colortext-justifybackground-positionborder-right-
colorborder-rightword-spacingpadding-leftlayout-grid-
modepadding-bottomfont-sizeborder-
bottomoverflowletter-spacingdisplayfont-familymargin-
rightbehaviorword-breaktext-transformbackground-
repeatborder-top-stylelayout-grid-charbackground-
imagetext-decorationcolorborder-styleborder-top-
widthborder-topz-indexmargin-bottompage-break-
afterfontborder-left-styleborder-widthmarginunicode-
bidibackground-colorfont-weightline-heightborder-
bottom-stylelayout-gridlayout-grid-typelayout-grid-
char-spacingborder-left-widthbackground-
attachmentborder-leftpadding-topborder-colorborder-
right-styleborder
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Web Workshop | DHTML, HTML & CSS
BR Element | BR Object Members
Inserts a line break.
Properties
Methods
Events
onlosecapture , onreadystatechange
Collections
attributes , behaviorUrns
Behaviors
clientCaps , download , homePage
Styles
widthbehaviorlayout-gridlayout-grid-modetext-
autospace
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
value Property VALUE Attribute | value P... DH
Web Workshop | DHTML, HTML & CSS
VALUE Attribute | value Property
Sets or retrieves the value of the object.
Syntax
Possible Values
sValue String that specifies the value of an object or a FORM control. The purpose of the string depends on the type of control, as follows:
checkbox The selected value. The control submits this value only if the user has selected the control. Otherwise,
the control submits no value.
file The value, a file name, typed by the user into the control. Unlike other controls, this value is read-only.
hidden The control submits this value when the form is submitted.
OPTION The selected value. The containing list box control submits this value only if the user has selected the
option.
password The default value. The control displays this value when it is first created and when the user clicks the
reset button.
radio The button label. If not set, the label defaults to "Reset".
reset The selected value. The control submits this value only if the user has selected the control. Otherwise,
the control submits no value.
submit The button label. If not set, the label defaults to "Submit Query."
text The default value. The control displays this value when it is first created and when the user clicks the
reset button.
This property is read/write with a default value of on for the checkbox and radio
objects, Submit Query for the submit object, and Reset for the reset object. All
other objects have no default value.
The VALUE attribute of the PARAM object specifies a value passed to an APPLET,
EMBED, or OBJECT object.
Example
This example sets the value for each option to an integer string (for example, a part
number).
<SELECT>
<OPTION VALUE="123">Item One
<OPTION VALUE="456">Item Two
<OPTION VALUE="789">Item Three
</SELECT>
Applies To
BUTTON, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=hidden, INPUT type=image, INPUT type=password, INPUT
type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, OPTION, PARAM
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
innerHTML Property ISMAP Attribute | isMap P..
Web Workshop | DHTML, HTML & CSS
innerText Property
Sets or retrieves the text between the start and end tags of the object.
Syntax
HTML N/A
Scripting object.innerText [ = sTxt ]
Possible Values
sTxt String that specifies the text between the start and end tags.
Remarks
The innerText property is read-only on the HTML, TABLE, TBODY, TFOOT, THEAD, and
TR objects.
When the innerText property is set, the given string completely replaces the existing
content of the object.
You can set this property only after the onload event fires on the window. When
dynamically creating a tag using TextRange, innerHTML, or outerHTML, use Microsoft®
JScript® (compatible with ECMA 262 language specification) to create new events to
handle the newly formed tags. Microsoft® Visual Basic® Scripting Edition (VBScript) is
not supported.
You can change the value of the TITLE element using the document.title property.
To change the contents of the TABLE, TFOOT, THEAD, and TR elements, use the
table object model. For example, use the rowIndex property or the rows collection to
retrieve a reference to a specific table row. You can add or delete rows using the
insertRow and deleteRow methods. To retrieve a reference to a specific cell, use the
cellIndex property or the cells collection. You can add or delete rows using the
insertCell and deleteCell methods. To change the content of a particular cell, use the
innerHTML property.
Example
This example uses the innerText property to replace an object's contents. The object
surrounding the text is not replaced.
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
A, ACRONYM, ADDRESS, B, BDO, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, custom, DD, DEL, DFN, DIR, EM, FIELDSET,
FONT, FORM, HEAD, Hn, HTML, I, IFRAME, INS, KBD, LABEL, LEGEND, LI, LISTING, MAP, MARQUEE, MENU, NEXTID, NOBR, OL, OPTION, P,
PLAINTEXT, PRE, Q, RT, RUBY, S, SAMP, SCRIPT, SELECT, SMALL, SPAN, STRIKE, STRONG, STYLE, SUB, SUP, TABLE, TBODY, TD, TEXTAREA,
TEXTAREA, TFOOT, TH, THEAD, TITLE, TR, TT, U, UL, VAR, XMP, XMP
See Also
insertAdjacentText
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
Web Workshop | DHTML, HTML & CSS
BUTTON Element | BUTTON Object
Members
Specifies a container for rich HTML that is rendered as a
button.
Properties
Methods
Events
Collections
Behaviors
Styles
border-top-colorwidthmargin-topborder-bottom-
widthpage-break-beforepadding-rightpaddingborder-
right-widthfiltertext-indentvisibilityfont-styleborder-left-
colormargin-lefttext-autospaceleftfont-
variantbackgrounddirectionborder-bottom-
colorpositionbackground-positionclearborder-right-
colorborder-rightword-spacingtoppadding-leftlayout-
grid-modeheightpadding-bottomrightfont-sizeborder-
bottomletter-spacingdisplayfloatfont-familymargin-
rightbehaviortext-transformbackground-repeatborder-
top-stylebackground-imagebottomcliptext-
decorationcolorborder-styleborder-top-widthborder-
topz-indexmargin-bottompage-break-afterfontborder-
left-styleborder-widthmarginunicode-bidibackground-
colorfont-weightline-heightborder-bottom-stylelayout-
gridborder-left-widthborder-leftpadding-topborder-
colorborder-right-styleborder
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Web Workshop | DHTML, HTML & CSS
CAPTION Element | CAPTION Object
Members
Specifies a brief description for a TABLE.
Properties
Methods
Collections
Behaviors
Styles
border-top-colorwidthmargin-topborder-bottom-
widthpadding-rightpaddingborder-right-
widthcursorvisibilityfont-styleborder-left-colormargin-
lefttext-autospacefont-
variantbackgrounddirectionborder-bottom-
colorbackground-positionclearborder-right-colorborder-
rightword-spacingpadding-leftlayout-grid-modepadding-
bottomfont-sizeborder-bottomletter-spacingdisplayfont-
familymargin-rightbehaviortext-transformbackground-
repeatborder-top-stylebackground-imagetext-
decorationcolorborder-styleborder-top-widthborder-
topz-indexmargin-bottomfontborder-left-styleborder-
widthmarginunicode-bidibackground-colorfont-
weightline-heightborder-bottom-stylelayout-gridborder-
left-widthborder-leftpadding-topborder-colorborder-
right-styleborder
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Web Workshop | DHTML, HTML & CSS
CENTER Element | CENTER Object
Members
Centers subsequent text and images.
Properties
Methods
Collections
Behaviors
Styles
border-top-colorwidthmargin-topborder-bottom-
widthpage-break-beforepadding-rightpaddingborder-
right-widthcursortext-indentvisibilityfont-styleborder-
left-colormargin-lefttext-autospaceleftoverflow-xlayout-
grid-linefont-variantoverflow-yline-
breakbackgroundtext-aligndirectionborder-bottom-
colortext-justifypositionbackground-positionclearborder-
right-colorborder-rightword-spacingtoppadding-
leftlayout-grid-modepadding-bottomrightfont-
sizeborder-bottomoverflowletter-
spacingdisplayfloatfont-familymargin-
rightbehaviorword-breaktext-transformbackground-
repeatborder-top-stylelayout-grid-charbackground-
imagebottomcliptext-decorationcolorborder-styleborder-
top-widthborder-topz-indexmargin-bottompage-break-
afterfontborder-left-styleborder-widthmarginunicode-
bidibackground-colorfont-weightline-heightborder-
bottom-stylelayout-gridlayout-grid-typelayout-grid-
char-spacingborder-left-widthborder-leftpadding-
topborder-colorborder-right-styleborder
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Web Workshop | DHTML, HTML & CSS
CITE Element | CITE Object Members
Indicates a citation by rendering text in italic.
Properties
Methods
Events
onbeforecopy , onbeforecut , onbeforepaste , onblur ,
onclick , oncontextmenu , oncopy , oncut , ondblclick ,
ondrag , ondragend , ondragenter , ondragleave ,
ondragover , ondragstart , ondrop , onfocus , onhelp ,
onkeydown , onkeypress , onkeyup , onlosecapture ,
onmousedown , onmousemove , onmouseout ,
onmouseover , onmouseup , onpaste ,
onpropertychange , onreadystatechange , onresize ,
onselectstart
Collections
Behaviors
Styles
widthfont-sizeoverflowpadding-rightletter-
spacingfloatdisplaypaddingfont-
familycursorbehaviortext-transformbackground-
repeatbackground-imagebottomvisibilityfont-
stylecliptext-autospaceleftoverflow-xfont-varianttext-
decorationoverflow-ybackgroundcolordirectionz-
indexpositionbackground-positionclearfontunicode-
bidibackground-colorfont-weightword-spacingline-
heighttoppadding-leftlayout-gridlayout-grid-
modepadding-toppadding-bottomright
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Web Workshop | DHTML, HTML & CSS
clientInformation Object Members
Contains information about the Web browser.
Properties
Methods
javaEnabled , taintEnabled
Collections
plugins
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
USEMAP Attribute | useMap... userLanguage Pr
Web Workshop | DHTML, HTML & CSS
userAgent Property
Retrieves a string equivalent to the HTTP user-agent request header.
Syntax
HTML N/A
Scripting [ sUserAgent = ] navigator.userAgent
Possible Values
Remarks
The HTTP user-agent request header contains information about compatibility, the
browser, and the platform name. For more information about the browser, see the
appName property. For more information about the platform, see the appVersion
property.
The userAgent property returns a different value depending on the browser and
platform versions. For example, Microsoft® Internet Explorer 4.01 returns the
following string for Microsoft ® Windows® 95.
Example
This example uses the userAgent property to specify a required platform before
additional script is executed. For example, if Windows 95 is a requirement for the
document, you can use a variable to determine whether the user is running the
necessary operating system. The "bIs95" variable is set to true if Windows 95 is found
in the userAgent value and the additional script is processed.
<SCRIPT>
var bIs95=false;
window.onload=fnInit;
function fnInit(){
if(navigator.userAgent.indexOf("Windows 95")>-1){
bIs95=true;
}
if(bIs95==true){
// Process additional script.
}
}
</SCRIPT>
Applies To
clientInformation, navigator
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
Web Workshop | DHTML, HTML & CSS
clipboardData Object Members
Provides access to predefined clipboard formats for use in
editing operations.
Methods
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Web Workshop | DHTML, HTML & CSS
CODE Element | CODE Object Members
Specifies a code sample.
Properties
Methods
Events
onbeforecopy , onbeforecut , onbeforepaste , onclick ,
oncontextmenu , oncopy , oncut , ondblclick , ondrag ,
ondragend , ondragenter , ondragleave , ondragover ,
ondragstart , ondrop , onhelp , onkeydown , onkeypress
, onkeyup , onlosecapture , onmousedown ,
onmousemove , onmouseout , onmouseover ,
onmouseup , onpaste , onpropertychange ,
onreadystatechange , onresize , onselectstart
Collections
Behaviors
Styles
widthfont-sizeoverflowpadding-rightletter-
spacingfloatdisplaypaddingfont-
familycursorbehaviortext-transformbackground-
repeatbackground-imagebottomvisibilityfont-
stylecliptext-autospaceleftoverflow-xfont-varianttext-
decorationoverflow-ybackgroundcolordirectionz-
indexpositionbackground-positionclearfontunicode-
bidibackground-colorfont-weightword-spacingline-
heighttoppadding-leftlayout-gridlayout-grid-
modepadding-toppadding-bottomright
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Web Workshop | DHTML, HTML & CSS
COL Element | COL Object Members
Specifies column-based defaults for the table properties.
Properties
Methods
Events
onreadystatechange
Collections
all , attributes , behaviorUrns , childNodes , children
Behaviors
Styles
widthfont-sizepadding-rightletter-
spacingdisplaypaddingfont-familycursorbehaviortext-
transformbackground-repeatbackground-imagevertical-
alignvisibilityfont-styletext-autospacefont-varianttext-
decorationbackgroundcolordirectionz-indexbackground-
positionclearfontunicode-bidibackground-colorfont-
weightword-spacingline-heightpadding-leftlayout-
gridlayout-grid-modepadding-toppadding-bottom
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Web Workshop | DHTML, HTML & CSS
COLGROUP Element | COLGROUP Object
Members
Contains a group of columns.
Properties
Methods
Events
onreadystatechange
Collections
Behaviors
Styles
widthfont-sizepadding-rightletter-
spacingdisplaypaddingfont-familycursorbehaviortext-
transformbackground-repeatbackground-
imagevisibilityfont-styletext-autospacefont-varianttext-
decorationbackgroundcolordirectionz-indexbackground-
positionclearfontunicode-bidibackground-colorfont-
weightword-spacingline-heightpadding-leftlayout-
gridlayout-grid-modepadding-toppadding-bottom
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
childNodes Collection controlRange Collection
Web Workshop | DHTML, HTML & CSS
children Collection
Retrieves a collection of elements that are direct descendants of the object.
Syntax
[ collChildren = ] object.children
[ oObject = ] object.children(vIndex [, iSubIndex])
Possible Values
Members
Remarks
Similar to the objects contained in the all collection, the objects contained in the
children collection are undefined if the child elements are overlapping tags.
Example
This example shows how to determine the collections for two DIV elements, divONE
and divTWO. The children collection for divONE includes IMG, DIV, and BUTTON. The
children collection for divTWO includes P.
<DIV id=divONE>
<IMG src=mygif.gif>
<DIV id=divTWO>
<P>Some text in a paragraph
</DIV>
<BUTTON> The label for the button </BUTTON>
</DIV>
Applies To
A, ACRONYM, ADDRESS, APPLET, AREA, B, BASE, BASEFONT, BDO, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL,
COLGROUP, custom, DD, DEL, DFN, DIR, DIV, DL, document, DT, EM, EMBED, FIELDSET, FONT, FORM, FRAME, FRAMESET, HEAD, Hn, HR, HTML, I,
IFRAME, IMG, INS, KBD, LABEL, LEGEND, LI, LINK, LISTING, MAP, MARQUEE, MENU, NEXTID, OL, OPTION, P, PLAINTEXT, PRE, Q, RT, RUBY, S,
SAMP, SCRIPT, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, THEAD, TITLE, TR, TT, U, UL, VAR,
XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
Web Workshop | DHTML, HTML & CSS
COMMENT Element | COMMENT Object
Members
Indicates a comment that is not displayed.
Properties
Methods
Events
onpropertychange , onreadystatechange
Collections
Styles
widthbehaviortext-autospace
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
HTML Element | HTML Objec... I Element | I Ob
Web Workshop | DHTML, HTML & CSS
HTML Comment Element
Prevents any enclosed text or HTML source code from being parsed and displayed in the
browser window.
Remarks
Example
This example uses HTML COMMENT tags, "<!-- -->", to insert a comment in an HTML
document.
<!-- This text will not appear in the browser window. -->
See Also
COMMENT
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
AddFavorite Method addReadRequest Method
Web Workshop | DHTML, HTML & CSS
addImport Method
Adds a style sheet to the imports collection for the given style sheet.
Syntax
Parameters
sURL Required. String that specifies the location of the source file for the style sheet.
iIndex Optional. Integer that specifies the requested position for the style sheet in the collection. If this value is not given, the style sheet is added
to the end of the collection.
Return Value
Integer. Returns a zero-based index value that specifies the position of the imported
style sheet in the imports collection.
Applies To
styleSheet
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
Web Workshop | DHTML, HTML & CSS
currentStyle Object Members
Represents the cascaded format and style of the object as
specified by global style sheets, inline styles, and HTML
attributes.
Properties
backgroundAttachment , backgroundColor ,
backgroundImage , backgroundPositionX ,
backgroundPositionY , backgroundRepeat ,
borderBottomColor , borderBottomStyle ,
borderBottomWidth , borderColor , borderLeftColor ,
borderLeftStyle , borderLeftWidth , borderRightColor ,
borderRightStyle , borderRightWidth , borderStyle ,
borderTopColor , borderTopStyle , borderTopWidth ,
borderWidth , bottom , clear , clipBottom , clipLeft ,
clipRight , clipTop , color , cursor , direction , fontFamily
, fontSize , fontStyle , fontVariant , fontWeight , height ,
layoutGridChar , layoutGridCharSpacing , layoutGridLine
, layoutGridMode , layoutGridType , left , letterSpacing ,
lineHeight , listStyleImage , listStylePosition ,
listStyleType , margin , marginBottom , marginLeft ,
marginRight , marginTop , overflow , overflowX ,
overflowY , pageBreakAfter , pageBreakBefore , right ,
styleFloat , tableLayout , textAlign , textDecoration ,
textIndent , textTransform , top , unicodeBidi ,
verticalAlign , visibility , width , zIndex
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
XMLDocument Property y Property DHTML Pr
Web Workshop | DHTML, HTML & CSS
XMLNS Attribute
Declares a namespace for custom tags in an HTML document.
Syntax
Possible Values
sNamespace String that specifies the namespace used as a prefix to custom tags, or the following value:
urn Uniform Resource Name (URN) that uniquely identifies the namespace.
The syntax for XMLNS is based on the W3C xml namespace spec . Although the
I
W3C draft allows you to declare namespaces on all tags, Internet Explorer supports
namespace declaration only on the HTML tag.
You can declare multiple namespaces on the HTML tag, as the syntax below shows:
Example
This example shows how to declare a namespace when one of the default behaviors in
Internet Explorer, clientCaps, is used as a custom tag in an HTML document. Note how
you must add the declared namespace (in this case, MSIE) to the custom tag when it
is defined.
This example also shows how the clientCaps behavior can be used to install the
Internet Explorer Data Binding component, if the component does not already exist in
the user's system.
Applies To
HTML
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
@import Rule ACCESSKEY Attribute | acc... D
Web Workshop | DHTML, HTML & CSS
@media Rule
Sets the media types for a set of styleSheet rules.
Syntax
Possible Values
Applies To
STYLE
See Also
media
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
Web Workshop | DHTML, HTML & CSS
custom Element | custom Object Members
Represents a user-defined element.
Properties
Methods
Events
Collections
Styles
border-top-colorwidthmargin-topborder-bottom-
widthpadding-rightpaddingborder-right-
widthcursorvertical-alignfiltervisibilityfont-styleborder-
left-colormargin-lefttext-autospaceleftoverflow-xfont-
variantoverflow-ybackgrounddirectionborder-bottom-
colorpositionbackground-positionclearborder-right-
colorborder-rightword-spacingtoppadding-leftlayout-
grid-modeheightpadding-bottomfont-sizeborder-
bottomoverflowletter-spacingdisplayfloatfont-
familymargin-rightbehaviortext-transformbackground-
repeatborder-top-stylebackground-
imagebottomcliptext-decorationcolorborder-styleborder-
top-widthborder-topz-indexmargin-bottomfontborder-
left-styleborder-widthmarginunicode-bidibackground-
colorfont-weightline-heightborder-bottom-stylelayout-
gridborder-left-widthborder-leftpadding-topborder-
colorborder-right-styleborder
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
setCapture Method setEndPoint Method DHTM
Web Workshop | DHTML, HTML & CSS
setData Method
Assigns data in a specified format to the dataTransfer or clipboardData object.
Syntax
Parameters
sDataFormat Required. String that specifies the format of the data to be transferred, using one of the following values:
Text Transfers data formatted as text.
URL Transfers data formatted as a URL.
sData Required. String that specifies the data supplied by the source object. This information can be descriptive text, a source path to an
image, or a URL for an anchor. When you pass URL as the sDataFormat parameter, you must use sData to provide the location of the
object being transferred.
Return Value
Boolean. Returns true if the data was successfully added, or false otherwise.
Remarks
Example
This example uses the setData and getData methods with the dataTransfer object to
create a shortcut to an image.
Applies To
clipboardData, dataTransfer
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
getClientRects Method getElementById Method
Web Workshop | DHTML, HTML & CSS
getData Method
Retrieves the data in the specified format from the clipboard through the dataTransfer or
clipboardData objects.
Syntax
sRetrieveData = object.getData(sDataFormat)
Parameters
sDataFormat Required. String that specifies one of the following data format values:
Text Retrieves data formatted as text.
URL Retrieves data formatted as a URL.
Return Value
String. Returns the data in the format retrieved from clipboard through the
dataTransfer or clipboardData object. Depending on the information contained in
setData, this variable can retrieve a path to an image, text, or an anchor URL.
Remarks
The getData method enforces cross-frame security and allows data transfers within
the same domain only. To the user this means that dragging a selection between
different security protocols, such as HTTP and HTTPS, will fail. In addition, dragging a
selection between two instances of the browser with different security levels, where
the first instance is set to medium and the second is set to high, will fail. Finally,
dragging a selection into the browser from another drag-enabled application, such as
Microsoft® Word, also will fail.
To use the getData method to retrieve data from the clipboard within the oncopy or
oncut event, specify window.event.returnValue=false within the event handler
script.
Example
The following examples use the setData and getData methods of the dataTransfer
object to drop text in a new location and create a desktop shortcut.
Applies To
clipboardData, dataTransfer
See Also
Properties
dropEffect , effectAllowed
Methods
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Web Workshop | DHTML, HTML & CSS
DD Element | DD Object Members
Indicates the definition in a definition list. The definition is
usually indented in the definition list.
Properties
Methods
Collections
Behaviors
Styles
border-top-colorwidthmargin-topborder-bottom-
widthpage-break-beforepadding-rightpaddingborder-
right-widthcursortext-indentvisibilityfont-styleborder-
left-colormargin-lefttext-autospaceleftoverflow-xlayout-
grid-linefont-variantoverflow-yline-
breakbackgroundtext-aligndirectionborder-bottom-
colortext-justifypositionbackground-positionclearborder-
right-colorborder-rightword-spacingtoppadding-
leftlayout-grid-modepadding-bottomrightfont-
sizeborder-bottomoverflowletter-
spacingdisplayfloatfont-familymargin-
rightbehaviorword-breaktext-transformbackground-
repeatborder-top-stylelayout-grid-charbackground-
imagebottomcliptext-decorationcolorborder-styleborder-
top-widthborder-topz-indexmargin-bottompage-break-
afterfontborder-left-styleborder-widthmarginunicode-
bidibackground-colorfont-weightline-heightborder-
bottom-stylelayout-gridlayout-grid-typelayout-grid-
char-spacingborder-left-widthborder-leftpadding-
topborder-colorborder-right-styleborder
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Web Workshop | DHTML, HTML & CSS
DEL Element | DEL Object Members
Indicates text that has been deleted from the document.
Properties
Methods
Events
Behaviors
Styles
widthdirectionoverflowpadding-
rightdisplaypaddingunicode-bidibehaviorpadding-
leftlayout-gridlayout-grid-modetext-autospacepadding-
topoverflow-xpadding-bottomoverflow-y
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Web Workshop | DHTML, HTML & CSS
DFN Element | DFN Object Members
Indicates the defining instance of a term.
Properties
Methods
Events
onbeforecopy , onbeforecut , onbeforepaste , onblur ,
onclick , oncontextmenu , oncopy , oncut , ondblclick ,
ondrag , ondragend , ondragenter , ondragleave ,
ondragover , ondragstart , ondrop , onfocus , onhelp ,
onkeydown , onkeypress , onkeyup , onlosecapture ,
onmousedown , onmousemove , onmouseout ,
onmouseover , onmouseup , onpaste ,
onpropertychange , onreadystatechange , onresize ,
onselectstart
Collections
Behaviors
Styles
widthfont-sizeoverflowpadding-rightletter-
spacingfloatdisplaypaddingfont-
familycursorbehaviortext-transformbackground-
repeatbackground-imagebottomtext-indentvisibilityfont-
stylecliptext-autospaceleftoverflow-xfont-varianttext-
decorationoverflow-ybackgroundcolordirectionz-
indexpositionbackground-positionclearfontunicode-
bidibackground-colorfont-weightword-spacingline-
heighttoppadding-leftlayout-gridlayout-grid-
modepadding-toppadding-bottomright
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Web Workshop | DHTML, HTML & CSS
DIR Element | DIR Object Members
Denotes a directory list.
Properties
Methods
Events
onbeforecopy , onbeforecut , onbeforepaste , onblur ,
onclick , oncontextmenu , oncopy , oncut , ondblclick ,
ondrag , ondragend , ondragenter , ondragleave ,
ondragover , ondragstart , ondrop , onfocus , onhelp ,
onkeydown , onkeypress , onkeyup , onlosecapture ,
onmousedown , onmousemove , onmouseout ,
onmouseover , onmouseup , onpaste ,
onpropertychange , onreadystatechange , onresize ,
onselectstart
Collections
Behaviors
Styles
border-top-colorwidthmargin-topborder-bottom-
widthpage-break-beforepadding-rightpaddingborder-
right-widthcursortext-indentvisibilityfont-styleborder-
left-colormargin-lefttext-autospaceleftoverflow-xlayout-
grid-linefont-variantoverflow-yline-
breakbackgroundtext-aligndirectionborder-bottom-
colortext-justifypositionbackground-positionclearborder-
right-colorborder-rightword-spacingtoppadding-
leftlayout-grid-modepadding-bottomrightfont-
sizeborder-bottomoverflowletter-
spacingdisplayfloatfont-familymargin-
rightbehaviorword-breaktext-transformbackground-
repeatborder-top-stylelayout-grid-charbackground-
imagebottomcliptext-decorationcolorborder-styleborder-
top-widthborder-topz-indexmargin-bottompage-break-
afterfontborder-left-styleborder-widthmarginunicode-
bidibackground-colorfont-weightline-heightborder-
bottom-stylelayout-gridlayout-grid-typelayout-grid-
char-spacingborder-left-widthborder-leftpadding-
topborder-colorborder-right-styleborder
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Web Workshop | DHTML, HTML & CSS
DIV Element | DIV Object Members
Specifies a container that renders HTML.
Properties
Methods
Events
onbeforecopy , onbeforecut , onbeforeeditfocus ,
onbeforepaste , onblur , onclick , oncontextmenu ,
oncopy , oncut , ondblclick , ondrag , ondragend ,
ondragenter , ondragleave , ondragover , ondragstart ,
ondrop , onfilterchange , onfocus , onhelp , onkeydown
, onkeypress , onkeyup , onlosecapture , onmousedown
, onmousemove , onmouseout , onmouseover ,
onmouseup , onpaste , onpropertychange ,
onreadystatechange , onresize , onscroll , onselectstart
Collections
Behaviors
Styles
border-top-colorwidthmargin-topborder-bottom-
widthpage-break-beforepadding-rightpaddingborder-
right-widthcursorfiltertext-indentvisibilityfont-
styleborder-left-colormargin-lefttext-
autospaceleftoverflow-xlayout-grid-linefont-
variantoverflow-yline-breakbackgroundtext-
aligndirectionborder-bottom-colortext-
justifypositionbackground-positionclearborder-right-
colorborder-rightword-spacingtoppadding-leftlayout-
grid-modeheightpadding-bottomrightfont-sizeborder-
bottomoverflowletter-spacingdisplayfloatfont-
familymargin-rightbehaviorword-breaktext-
transformbackground-repeatborder-top-stylelayout-
grid-charbackground-imagebottomcliptext-
decorationcolorborder-styleborder-top-widthborder-
topz-indexmargin-bottompage-break-afterfontborder-
left-styleborder-widthmarginunicode-bidibackground-
colorfont-weightline-heightborder-bottom-stylelayout-
gridlayout-grid-typelayout-grid-char-spacingborder-left-
widthborder-leftpadding-topborder-colorborder-right-
styleborder
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Web Workshop | DHTML, HTML & CSS
DL Element | DL Object Members
Denotes a definition list.
Properties
Methods
Events
onbeforecopy , onbeforecut , onbeforepaste , onblur ,
onclick , oncontextmenu , oncopy , oncut , ondblclick ,
ondrag , ondragend , ondragenter , ondragleave ,
ondragover , ondragstart , ondrop , onfocus , onhelp ,
onlosecapture , onmousedown , onmousemove ,
onmouseout , onmouseover , onmouseup , onpaste ,
onpropertychange , onreadystatechange , onresize ,
onselectstart
Collections
Behaviors
Styles
border-top-colorwidthmargin-topborder-bottom-
widthpage-break-beforepadding-rightpaddingborder-
right-widthcursortext-indentvisibilityfont-styleborder-
left-colormargin-lefttext-autospaceleftoverflow-xlayout-
grid-linefont-variantoverflow-yline-
breakbackgroundtext-aligndirectionborder-bottom-
colortext-justifypositionbackground-positionclearborder-
right-colorborder-rightword-spacingtoppadding-
leftlayout-grid-modepadding-bottomrightfont-
sizeborder-bottomoverflowletter-
spacingdisplayfloatfont-familymargin-
rightbehaviorword-breaktext-transformbackground-
repeatborder-top-stylelayout-grid-charbackground-
imagebottomcliptext-decorationcolorborder-styleborder-
top-widthborder-topz-indexmargin-bottompage-break-
afterfontborder-left-styleborder-widthmarginunicode-
bidibackground-colorfont-weightline-heightborder-
bottom-stylelayout-gridlayout-grid-typelayout-grid-
char-spacingborder-left-widthborder-leftpadding-
topborder-colorborder-right-styleborder
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
nextPage Method open Method DHTML Metho
Web Workshop | DHTML, HTML & CSS
open Method
Opens a new window and loads the document specified by a given URL, or opens a blank
document if a URL is not provided.
Syntax
Parameters
sURL Optional. String that specifies the URL of the document to display. If no URL is specified, a new window with about:blank is displayed.
sName Optional. String that specifies the name of the window. This name is used as the value for the TARGET attribute on a FORM or an A
element.
In Internet Explorer 5 and later, specifying the value _search opens sURL in the browser's search pane.
sFeatures Optional. String that specifies the window ornaments to display. The following features are supported:
channelmode = { yes | no | 1 | 0 } Specifies whether to display the window in theater mode and show
the channel band. The default is no.
directories = { yes | no | 1 | 0 } Specifies whether to add directory buttons. The default is yes.
fullscreen = { yes | no | 1 | 0 } Specifies whether to display the browser in a full-screen or normal
window. The default is no, which displays the browser in a normal
window.
Use full-screen mode carefully. Because this mode hides the
browser's title bar and menus, you should always provide a button or
other visual clue to help the user close the window. ALT+F4 also
closes the new window.
height = number Specifies the height of the window, in pixels. The minimum value is
100.
left = number Specifies the left position, in pixels. This value is relative to the
upper-left corner of the screen.
location = { yes | no | 1 | 0 } Specifies whether to display the input field for entering URLs directly
into the browser. The default is yes.
menubar = { yes | no | 1 | 0 } Specifies whether to display the menu bar. The default is yes.
resizable = { yes | no | 1 | 0 } Specifies whether to display resize handles at the corners of the
window. The default is yes.
scrollbars = { yes | no | 1 | 0 } Specifies whether to display horizontal and vertical scroll bars. The
default is yes.
status = { yes | no | 1 | 0 } Specifies whether to add a status bar at the bottom of the window.
The default is yes.
titlebar = { yes | no | 1 | 0 } Specifies whether to display a title bar for the window. This
parameter is ignored unless the caller is an html applicationIn or a
trusted dialog box. The default is yes.
toolbar = { yes | no | 1 | 0 } Specifies whether to display the browser toolbar, making buttons
such as Back, Forward, and Stop available. The default is yes.
top = number Specifies the top position, in pixels. This value is relative to the
upper-left corner of the screen.
width = number Sets the width of the window, in pixels. The minimum value is 100.
bReplace Optional. Boolean that specifies whether the URL that is loaded into the new page should create a new entry in the window's browsing
history or replace the current entry in the browsing history. If set to true, no new history entry is created.
Return Value
Returns a reference to the new window object. Use this reference to script properties
and methods on the new window.
Remarks
By default, the open method creates a window that has a default width and height and
the standard menu, toolbar, and other features of Microsoft® Internet Explorer. You
can alter this set of features by using the sFeatures parameter. This parameter is a
string consisting of one or more feature settings. When one feature is specified, any
additional features that are not specified are disabled. If no features are specified, the
window features maintain their default values. In addition to enabling a feature with
the specified possible value, simply listing the feature name also enables that feature
for the new window.
Internet Explorer 5 allows further control over windows through the implementation of
title in the sFeatures parameter of the open method. Turn off the title bar by
opening the window from a trusted application, such as Microsoft® Visual Basic® or an
HTML Application (HTA). These applications are considered trusted, because each uses
Internet Explorer interfaces instead of the browser.
Windows CE
In Microsoft® Windows® CE, the document object is not available through scripting for
a window opened using the open method.
Example
This example uses the open method to create a new window that contains
Sample.htm. The new window is 200 pixels by 400 pixels and has a status bar, but it
does not have a toolbar, menu bar, or address field.
window.open("Sample.htm",null,
"height=200,width=400,status=yes,toolbar=no,menubar=no,location=
no");
Applies To
window
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
Web Workshop | DHTML, HTML & CSS
document Object Members
Represents the HTML document in a given browser window.
Properties
Methods
Events
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Web Workshop | DHTML, HTML & CSS
DT Element | DT Object Members
Indicates a definition term within a definition list.
Properties
Methods
Events
onbeforecopy , onbeforecut , onbeforepaste , onblur ,
onclick , oncontextmenu , oncopy , oncut , ondblclick ,
ondrag , ondragend , ondragenter , ondragleave ,
ondragover , ondragstart , ondrop , onfocus , onhelp ,
onkeydown , onkeypress , onkeyup , onlosecapture ,
onmousedown , onmousemove , onmouseout ,
onmouseover , onmouseup , onpaste ,
onpropertychange , onreadystatechange , onresize ,
onselectstart
Collections
Behaviors
Styles
border-top-colorwidthmargin-topborder-bottom-
widthpage-break-beforepadding-rightpaddingborder-
right-widthcursortext-indentvisibilityfont-styleborder-
left-colormargin-lefttext-autospaceleftoverflow-xlayout-
grid-linefont-variantoverflow-yline-
breakbackgroundtext-aligndirectionborder-bottom-
colortext-justifypositionbackground-positionclearborder-
right-colorborder-rightword-spacingtoppadding-
leftlayout-grid-modepadding-bottomfont-sizeborder-
bottomoverflowletter-spacingdisplayfloatfont-
familymargin-rightbehaviorword-breaktext-
transformbackground-repeatborder-top-stylelayout-
grid-charbackground-imagecliptext-
decorationcolorborder-styleborder-top-widthborder-
topz-indexmargin-bottompage-break-afterfontborder-
left-styleborder-widthmarginunicode-bidibackground-
colorfont-weightline-heightborder-bottom-stylelayout-
gridlayout-grid-typelayout-grid-char-spacingborder-left-
widthborder-leftpadding-topborder-colorborder-right-
styleborder
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Web Workshop | DHTML, HTML & CSS
EM Element | EM Object Members
Emphasizes text, usually by rendering it in italic.
Properties
Methods
Events
onbeforecopy , onbeforecut , onbeforepaste , onblur ,
onclick , oncontextmenu , oncopy , oncut , ondblclick ,
ondrag , ondragend , ondragenter , ondragleave ,
ondragover , ondragstart , ondrop , onfocus , onhelp ,
onkeydown , onkeypress , onkeyup , onlosecapture ,
onmousedown , onmousemove , onmouseout ,
onmouseover , onmouseup , onpaste ,
onpropertychange , onreadystatechange , onresize ,
onselectstart
Collections
Behaviors
Styles
widthfont-sizeoverflowpadding-rightletter-
spacingfloatdisplaypaddingfont-
familycursorbehaviortext-transformbackground-
repeatbackground-imagevisibilityfont-stylecliptext-
autospaceleftoverflow-xfont-varianttext-
decorationoverflow-ybackgroundcolordirectionz-
indexpositionbackground-positionclearfontunicode-
bidibackground-colorfont-weightword-spacingline-
heighttoppadding-leftlayout-gridlayout-grid-
modepadding-toppadding-bottom
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Web Workshop | DHTML, HTML & CSS
EMBED Element | EMBED Object Members
Allows documents of any type to be embedded.
Properties
Methods
Events
onbeforecut , onbeforepaste , onblur , onclick ,
oncontextmenu , oncut , ondblclick , onfocus , onhelp ,
onload , onlosecapture , onmousedown , onmousemove
, onmouseout , onmouseover , onmouseup , onpaste ,
onpropertychange , onreadystatechange , onresize ,
onscroll
Collections
Behaviors
Styles
border-top-colorwidthmargin-topborder-bottom-
widthborder-bottomoverflowpadding-
rightfloatdisplaypaddingmargin-rightborder-right-
widthcursorbehaviorborder-top-stylevisibilityclipborder-
left-colormargin-lefttext-autospaceleftoverflow-
xoverflow-yborder-styleborder-topborder-top-
widthdirectionborder-bottom-colormargin-
bottompositionclearborder-left-styleborder-right-
colorborder-rightmarginborder-widthunicode-
biditoppadding-leftborder-bottom-stylelayout-
gridborder-left-widthborder-leftheightlayout-grid-
modepadding-toppadding-bottomborder-colorborder-
right-styleborder
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
FRAMESPACING Attribute | ... hash Property
Web Workshop | DHTML, HTML & CSS
fromElement Property
Retrieves the object the mouse pointer is exiting during the onmouseover and onmouseout
events.
Syntax
HTML N/A
Scripting [ oObject = ] event.fromElement
Possible Values
oObject Object that specifies the previous location of the mouse pointer.
Example
In this example, the alert returns "mouse arrived" when the mouse pointer moves over
the button.
<SCRIPT>
function testMouse(oObject) {
if(!oObject.contains(event.fromElement)) {
alert("mouse arrived");
}
}
</SCRIPT>
:
<BUTTON ID=oButton onmouseover="testMouse(this)">Mouse Over
This.</BUTTON>
This feature requires Internet Explorer 5 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
HTML N/A
Scripting event
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
TITLE Attribute | title P... top Attribute | top Pro
Web Workshop | DHTML, HTML & CSS
toElement Property
Retrieves a reference to the object to which the user is moving the mouse pointer.
Syntax
HTML N/A
Scripting [ oObject = ] event.toElement
Possible Values
oObject Object that specifies the object being moved to by the mouse.
Example
This example uses the toElement property to display the tagName of the object to
which the user moves the mouse pointer.
<SCRIPT>
function fnGetTo(){
spanTo.innerHTML=window.event.toElement.tagName;
}
</SCRIPT>
:
<SPAN onmouseout="fnGetTo()">
<P>Mouse Over This</P>
<P>toElement: <SPAN ID="spanTo"></SPAN></P>
</SPAN>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
HTML N/A
Scripting event
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
onmouseout Event onmouseup Event DHTML
Web Workshop | DHTML, HTML & CSS
onmouseover Event
Fires when the user moves the mouse pointer into the object.
Syntax
Remarks
Bubbles Yes
Cancels Yes
To invoke Move the mouse pointer into an object.
Default action Initiates any action associated with this event.
The event occurs when the user moves the mouse pointer into the object, and it does
not repeat unless the user moves the mouse pointer out of the object and then back
into it.
Although event handlers in the DHTML Object Model do not receive parameters
directly, the handler can query the event object for data.
Example
This example uses the onmouseover event to apply a new style to an object.
<DIV>
<P onmouseover="this.style.color='red'"
onmouseout="this.style.color='black'">
Move the mouse pointer over this text, then move it elsewhere in
the
document. Move the mouse pointer over this text, then move it
elsewhere in the document.
</DIV>
This example shows how to change the value of a text area in response to mouse
events.
<DIV>
<P>Move the mouse pointer into the text area to fire the
onmouseover event. Move it out to clear the text.
<TEXTAREA NAME=txtMouseTrack
onmouseover="this.value='onmouseover fired'"
onmouseout="this.value=''">
</TEXTAREA>
</DIV>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
A, ADDRESS, APPLET, AREA, B, BDO, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, custom, DD, DFN, DIR, DIV, DL,
document, DT, EM, EMBED, FIELDSET, FONT, FORM, Hn, HR, I, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT
type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, KBD, LABEL, LEGEND, LI,
LISTING, MAP, MARQUEE, MENU, NEXTID, NOBR, OL, P, PLAINTEXT, PRE, RT, RUBY, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP,
TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
onmousemove Event onmouseover Event DH
Web Workshop | DHTML, HTML & CSS
onmouseout Event
Fires when the user moves the mouse pointer outside the boundaries of the object.
Syntax
Remarks
Bubbles Yes
Cancels No
To invoke Move the mouse pointer out of an object.
Default action Initiates any action associated with this event.
When the user moves the mouse over an object, one onmouseover event occurs,
followed by one or more onmousemove events as the user moves the mouse pointer
within the object. One onmouseout event occurs when the user moves the mouse
pointer out of the object.
Although event handlers in the DHTML Object Model do not receive parameters
directly, the handler can query the event object for data.
Example
The following examples use the mouseout event to create interactive effects.
Applies To
A, ADDRESS, APPLET, AREA, B, BDO, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, custom, DD, DFN, DIR, DIV, DL,
document, DT, EM, EMBED, FIELDSET, FONT, FORM, Hn, HR, I, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT
type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, KBD, LABEL, LEGEND, LI,
LISTING, MAP, MARQUEE, MENU, OL, P, PLAINTEXT, PRE, RT, RUBY, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY,
TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP
See Also
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
Web Workshop | DHTML, HTML & CSS
event Object Members
Represents the state of an event, such as the element in
which the event occurred, the state of the keyboard keys,
the location of the mouse, and the state of the mouse
buttons.
Properties
Collections
bookmarks , boundElements
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Web Workshop | DHTML, HTML & CSS
external Object Members
Allows access to an additional object model provided by
host applications of the Microsoft® Internet Explorer
browser components.
Properties
menuArguments
Methods
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Web Workshop | DHTML, HTML & CSS
FIELDSET Element | FIELDSET Object
Members
Draws a box around the text and other elements that the
field set contains.
Properties
Methods
Events
Collections
Behaviors
Styles
border-top-colorwidthmargin-topborder-bottom-
widthpage-break-beforepadding-rightpaddingborder-
right-widthcursortext-indentvisibilityfont-styleborder-
left-colormargin-lefttext-autospaceleftoverflow-xlayout-
grid-linefont-variantoverflow-yline-
breakbackgroundtext-aligndirectionborder-bottom-
colortext-justifypositionbackground-positionclearborder-
right-colorborder-rightword-spacingtoppadding-
leftlayout-grid-modeheightpadding-bottomrightfont-
sizeborder-bottomoverflowletter-
spacingdisplayfloatfont-familymargin-
rightbehaviorword-breaktext-transformbackground-
repeatborder-top-stylelayout-grid-charbackground-
imagebottomcliptext-decorationcolorborder-styleborder-
top-widthborder-topz-indexmargin-bottompage-break-
afterfontborder-left-styleborder-widthmarginunicode-
bidibackground-colorfont-weightline-heightborder-
bottom-stylelayout-gridlayout-grid-typelayout-grid-
char-spacingborder-left-widthborder-leftpadding-
topborder-colorborder-right-styleborder
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Web Workshop | DHTML, HTML & CSS
FONT Element | FONT Object Members
Specifies a new font, size, and color to be used for
rendering the enclosed text.
Properties
Methods
Events
onbeforecut , onbeforepaste , onblur , onclick ,
oncontextmenu , oncut , ondblclick , ondrag ,
ondragend , ondragenter , ondragleave , ondragover ,
ondragstart , ondrop , onfocus , onhelp , onkeydown ,
onkeypress , onkeyup , onlosecapture , onmousedown ,
onmousemove , onmouseout , onmouseover ,
onmouseup , onpaste , onpropertychange ,
onreadystatechange , onselectstart
Collections
Behaviors
Styles
widthdirectionoverflowpadding-
rightdisplaypaddingunicode-bidibehaviorpadding-
leftlayout-gridlayout-grid-modetext-autospacepadding-
topoverflow-xpadding-bottomoverflow-y
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
MULTIPLE Attribute | mult... NAME Attribute | n
Web Workshop | DHTML, HTML & CSS
NAME Attribute | name Property
Sets or retrieves the window or frame name.
Syntax
Possible Values
The name property identifies which frame displays the content of a linked document.
Example
window.name="MyWindow";
parent.frames[0].name="Left";
This example shows how the NAME attribute for a window can be persisted in HTML,
but only when defined in a frame within a frameset.
<FRAMESET>
<FRAME NAME="Left" SRC="blank.htm">
<FRAME NAME="Right" SRC="contents.htm">
</FRAMESET>
This example uses the window's open method to assign the name property.
window.open("file.htm","Frame1");
Applies To
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
HTTP-EQUIV Attribute | ht... ime-mode Attribut
Web Workshop | DHTML, HTML & CSS
ID Attribute | id Property
Retrieves the string identifying the object.
Syntax
Possible Values
sID Any alphanumeric string that begins with a letter. The underscore (_) can also be used.
In Microsoft® Internet Explorer 5 and later, the property is read/write. The property
has no default value.
Remarks
The id should be unique throughout the scope of the current document. If a document
contains more than one object with the same identifier, the objects are exposed as a
collection that can be referenced only in ordinal position.
Example
This example sets the ID attribute and then passes it to a function to manipulate the
object that the attribute is attached to.
<SCRIPT>
function checkCols(oObject)
{
var iColumns = oObject.cols;
alert (iColumns);
}
</SCRIPT>
</HEAD>
<BODY>
<TABLE ID=oTable BORDER COLS=3 onclick="checkCols(this)">
<TR><TD>Column 1</TD><TD>Column 2</TD><TD>Column 3</TD></TR>
</TABLE>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
A, ACRONYM, ADDRESS, APPLET, AREA, B, BASE, BASEFONT, BDO, BGSOUND, BIG, BLOCKQUOTE, BODY, BR, BUTTON, CAPTION, CENTER, CITE,
CODE, COL, COLGROUP, COMMENT, custom, DD, DEL, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, FRAME, FRAMESET, HEAD, Hn,
HR, HTML, I, IFRAME, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=hidden, INPUT type=image, INPUT
type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, INS, ISINDEX, KBD, LABEL, LEGEND, LI, LINK,
LISTING, MAP, MARQUEE, MENU, NEXTID, NOBR, NOFRAMES, NOSCRIPT, OBJECT, OL, OPTION, P, PLAINTEXT, PRE, Q, RT, RUBY, S, SAMP,
SCRIPT, SELECT, SMALL, SPAN, STRIKE, STRONG, styleSheet, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TITLE, TR, TT, U, UL,
VAR, WBR, XML, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
controlRange Collection embeds Collection DH
Web Workshop | DHTML, HTML & CSS
elements Collection
Retrieves a collection, in source order, of all objects in a given form.
Syntax
[collElements = ]form.elements
[oObject= ]form.elements(vIndex [,iSubIndex])
Possible Values
Members
Remarks
This collection can contain any combination of the INPUT, SELECT, and TEXTAREA
objects.
Applies To
FORM
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
onstop Event onunload Event DHTML Events
Web Workshop | DHTML, HTML & CSS
onsubmit Event
Fires when a form is about to be submitted.
Syntax
Remarks
Bubbles No
Cancels Yes
To invoke Submit a form using the INPUT TYPE=submit, INPUT TYPE=image, or BUTTON TYPE=submit object.
Default action Causes a form to be sent to whatever location is stipulated in the ACTION attribute of the form object.
You can override this event by returning false in the event handler. Use this capability
to validate data on the client side to prevent invalid data from being submitted to the
server. If the event handler is called by the onsubmit attribute of the form object, the
code must explicitly request the return value using the return function, and the event
handler must provide an explicit return value for each possible code path in the event
handler function.
The submit method does not invoke the onsubmit event handler.
Although event handlers in the DHTML Object Model do not receive parameters
directly, the handler can query the event object for data.
Example
This example shows how to use onsubmit on a form to request the return value using
the return function.
<BODY>
<FORM NAME="oDoSubmit"
onsubmit="return(myOnSubmitEventHandler());">
</FORM>
</BODY>
Applies To
FORM
See Also
ACTION, METHOD
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
Web Workshop | DHTML, HTML & CSS
FORM Element | FORM Object Members
Specifies that the contained controls take part in a form.
Properties
Methods
Events
onbeforecopy , onbeforecut , onbeforepaste , onblur ,
onclick , oncontextmenu , oncopy , oncut , ondblclick ,
ondrag , ondragend , ondragenter , ondragleave ,
ondragover , ondragstart , ondrop , onfocus , onhelp ,
onkeydown , onkeypress , onkeyup , onlosecapture ,
onmousedown , onmousemove , onmouseout ,
onmouseover , onmouseup , onpaste ,
onpropertychange , onreadystatechange , onreset ,
onresize , onselectstart , onsubmit
Collections
Behaviors
Styles
border-top-colorwidthmargin-topborder-bottom-
widthpage-break-beforepadding-rightpaddingborder-
right-widthcursortext-indentvisibilityfont-styleborder-
left-colormargin-lefttext-autospaceleftoverflow-xlayout-
grid-linefont-variantoverflow-yline-
breakbackgroundtext-aligndirectionborder-bottom-
colortext-justifypositionbackground-positionclearborder-
right-colorborder-rightword-spacingtoppadding-
leftlayout-grid-modepadding-bottomrightfont-
sizeborder-bottomoverflowletter-
spacingdisplayfloatfont-familymargin-
rightbehaviorword-breaktext-transformbackground-
repeatborder-top-stylelayout-grid-charbackground-
imagebottomcliptext-decorationcolorborder-styleborder-
top-widthborder-topz-indexmargin-bottompage-break-
afterfontborder-left-styleborder-widthmarginunicode-
bidibackground-colorfont-weightline-heightborder-
bottom-stylelayout-gridlayout-grid-typelayout-grid-
char-spacingborder-left-widthborder-leftpadding-
topborder-colorborder-right-styleborder
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
ACCESSKEY Attribute | acc... active Pseudo-cla
Web Workshop | DHTML, HTML & CSS
ACTION Attribute | action Property
Sets or retrieves the URL to which the FORM content is to be sent for processing.
Syntax
Possible Values
sURL String that specifies the URL to be used. If a relative path is specified, the base URL of the document is assumed.
The way the data is submitted depends on the value of the method and encoding
properties.
Example
This example uses the ACTION attribute to post a form to a specified URL.
<HTML>
<FORM ACTION="http://example.microsoft.com/sample.asp"
METHOD="POST">
Enter your name: <INPUT NAME="FName"><BR>
Favorite Ice Cream Flavor:
<SELECT NAME="Flavor">
<OPTION VALUE="Chocolate">Chocolate
<OPTION VALUE="Strawberry">Strawberry
<OPTION VALUE="Vanilla" SELECTED>Vanilla
</SELECT>
<P><INPUT TYPE=SUBMIT>
</FORM>
</HTML>
This example uses the ACTION attribute to specify a URL for the mailto protocol .
I
Applies To
FORM
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
menuArguments Property METHODS Attribute
Web Workshop | DHTML, HTML & CSS
METHOD Attribute | method Property
Sets or retrieves how to send the form data to the server.
Syntax
Possible Values
FORM
See Also
action
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
Web Workshop | DHTML, HTML & CSS
FRAME Element | FRAME Object Members
Specifies an individual frame within a FRAMESET element.
Properties
Methods
Events
Collections
Styles
widthpadding-rightdisplaypaddingbehaviorpadding-
leftlayout-gridlayout-grid-modepadding-toptext-
autospacepadding-bottom
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Web Workshop | DHTML, HTML & CSS
FRAMESET Element | FRAMESET Object
Members
Specifies a frameset, which is used to organize multiple
frames and nested framesets.
Properties
Methods
Events
Behaviors
Styles
widthbehaviorlayout-gridlayout-grid-mode
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Web Workshop | DHTML, HTML & CSS
HEAD Element | HEAD Object Members
Provides an unordered collection of information about the
document.
Properties
Methods
Events
onreadystatechange
Collections
Styles
widthbehaviorlayout-gridlayout-grid-modetext-
autospace
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
autoscan Method blur Method DHTML Method
Web Workshop | DHTML, HTML & CSS
back Method
Loads a URL from the History list.
Syntax
history.back([iDistance])
Parameters
iDistance Optional. Integer that specifies the number of URLs to go back. If no value is provided, the previous URL is loaded.
Return Value
No return value.
Remarks
This method performs the same action as when a user clicks the Back button in the
browser. The back method works the same as history.go(-1). An error does not
occur if the user tries to go beyond the beginning of the history. Instead, the user
remains at the current page.
Applies To
history
See Also
forward, go
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
focus Method getAdjacentText Method DHTML
Web Workshop | DHTML, HTML & CSS
forward Method
Loads the next URL in the History list.
Syntax
history.forward()
Return Value
No return value.
Remarks
This method performs the same action as when a user clicks the Forward button in the
browser. The forward method works the same as history.go(1). An error does not
occur if the user tries to go beyond the end of the history. Instead, the user remains at
the current page.
Applies To
history
See Also
back, go
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
getExpression Method hasChildNodes Method
Web Workshop | DHTML, HTML & CSS
go Method
Loads a URL from the History list.
Syntax
history.go(vLocation)
Parameters
vLocation Required. Variant that specifies an integer or a string. The integer indicates the relative position of the URL in the History list, and the
string indicates all or part of a URL in the browser history.
Return Value
No return value.
Remarks
An error does not occur if the user tries to go beyond the beginning or end of the
history. Instead, the user remains at the current page.
Applies To
history
See Also
back, forward
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
Web Workshop | DHTML, HTML & CSS
history Object Members
Contains information about the URLs visited by the client.
Properties
length
Methods
back , forward , go
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Web Workshop | DHTML, HTML & CSS
Hn Element | Hn Object Members
Renders text in heading style.
Properties
Methods
Events
onbeforecopy , onbeforecut , onbeforepaste , onblur ,
onclick , oncontextmenu , oncopy , oncut , ondblclick ,
ondrag , ondragend , ondragenter , ondragleave ,
ondragover , ondragstart , ondrop , onfocus , onhelp ,
onkeydown , onkeypress , onkeyup , onlosecapture ,
onmousedown , onmousemove , onmouseout ,
onmouseover , onmouseup , onpaste ,
onpropertychange , onreadystatechange , onresize ,
onselectstart
Collections
Behaviors
Styles
border-top-colorwidthmargin-topborder-bottom-
widthpage-break-beforepadding-rightpaddingborder-
right-widthcursortext-indentvisibilityfont-styleborder-
left-colormargin-lefttext-autospaceleftoverflow-xlayout-
grid-linefont-variantoverflow-yline-
breakbackgroundtext-aligndirectionborder-bottom-
colortext-justifypositionbackground-positionclearborder-
right-colorborder-rightword-spacingtoppadding-
leftlayout-grid-modepadding-bottomrightfont-
sizeborder-bottomoverflowletter-
spacingdisplayfloatfont-familymargin-
rightbehaviorword-breaktext-transformbackground-
repeatborder-top-stylelayout-grid-charbackground-
imagebottomcliptext-decorationcolorborder-styleborder-
top-widthborder-topmargin-bottompage-break-
afterfontborder-left-styleborder-widthmarginunicode-
bidibackground-colorfont-weightline-heightborder-
bottom-stylelayout-gridlayout-grid-typelayout-grid-
char-spacingborder-left-widthborder-leftpadding-
topborder-colorborder-right-styleborder
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Web Workshop | DHTML, HTML & CSS
HR Element | HR Object Members
Draws a horizontal rule.
Properties
Methods
Events
Collections
Behaviors
Styles
border-top-colorwidthmargin-topborder-bottom-
widthpadding-rightpaddingborder-right-widthcursortext-
indentvisibilityborder-left-colormargin-lefttext-
autospaceleftlayout-grid-lineline-breaktext-alignborder-
bottom-colortext-justifypositionclearborder-right-
colorborder-righttoppadding-leftlayout-grid-
modeheightpadding-bottomrightborder-
bottomdisplayfloatmargin-rightbehaviorword-
breakborder-top-stylelayout-grid-charbottomclipborder-
styleborder-top-widthborder-topmargin-bottomborder-
left-styleborder-widthmarginlayout-gridborder-bottom-
stylelayout-grid-typelayout-grid-char-spacingborder-
leftborder-left-widthpadding-topborder-colorborder-
right-style
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
parent Property parentNode Property DHTML
Web Workshop | DHTML, HTML & CSS
parentElement Property
Retrieves the parent object in the object hierarchy.
Syntax
HTML N/A
Scripting [ oElement = ] object.parentElement
Possible Values
Remarks
Applies To
A, ACRONYM, ADDRESS, APPLET, AREA, B, BASE, BASEFONT, BDO, BGSOUND, BIG, BLOCKQUOTE, BODY, BR, BUTTON, CAPTION, CENTER, CITE,
CODE, COL, COLGROUP, COMMENT, custom, DD, DEL, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, FRAME, FRAMESET, HEAD, Hn,
HR, HTML, I, IFRAME, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=hidden, INPUT type=image, INPUT
type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, INS, ISINDEX, KBD, LABEL, LEGEND, LI, LINK,
LISTING, MAP, MARQUEE, MENU, NEXTID, NOBR, NOFRAMES, NOSCRIPT, OBJECT, OL, OPTION, P, PLAINTEXT, PRE, Q, RT, RUBY, S, SAMP,
SCRIPT, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TITLE, TR, TT, U, UL, VAR, WBR,
XML, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
Web Workshop | DHTML, HTML & CSS
HTML Element | HTML Object Members
Identifies the document as containing HTML elements.
Properties
Methods
Events
onreadystatechange
Collections
Styles
colorbackgroundfont-sizeletter-spacingbackground-
positionfontfont-familycursorbackground-colorfont-
weightbehaviorword-spacingtext-transformbackground-
repeatline-heightbackground-imagevisibilityfont-
stylebackground-attachmenttext-autospacefont-
varianttext-decoration
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Web Workshop | DHTML, HTML & CSS
I Element | I Object Members
Specifies that the text should be rendered in italic, where
available.
Properties
Methods
Collections
Behaviors
Styles
widthfont-sizeoverflowpadding-rightletter-
spacingfloatdisplaypaddingfont-
familycursorbehaviortext-transformbackground-
repeatbackground-imagebottomvisibilityfont-
stylecliptext-autospaceleftoverflow-xfont-varianttext-
decorationoverflow-ybackgroundcolordirectionz-
indexpositionbackground-positionclearfontunicode-
bidibackground-colorfont-weightword-spacingline-
heighttoppadding-leftlayout-gridlayout-grid-
modepadding-toppadding-bottomright
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
forms Collection images Collection DHTML Co
Web Workshop | DHTML, HTML & CSS
frames Collection
Retrieves a collection of all window objects defined by the given document or defined by
the document associated with the given window.
Syntax
[ collFrames = ] object.frames
[ oObject = ] object.frames(vIndex [, iSubIndex] )
Possible Values
Members
Remarks
If the HTML source document contains a BODY tag, the collection contains one window
for each IFRAME object in the document. If the source document contains FRAMESET
tags, the collection contains one window for each FRAME tag in the document. In both
cases, the order is determined by the HTML source.
This collection contains only window objects and does not provide access to the
corresponding FRAME and IFRAME objects. To access these objects, use the all
collection for the document containing the objects.
Although you can use names with the item method on this collection, the method
never returns a collection. Instead, it always returns the first window having the given
name. To ensure that all windows are accessible, make sure that no two windows in a
document have the same name.
Example
This example in JScript® (compatible with ECMA 262 language specification) shows
how to display the URLs of the HTML documents contained in windows created by the
IFRAME objects in the document.
This example in JScript shows how to display the name of each window defined by
FRAME tags in the parent window of the current document.
var frm = window.parent.frames;
for (i=0; i < frm.length; i++)
alert(frm(i).name);
Applies To
document, window
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
Web Workshop | DHTML, HTML & CSS
IFRAME Element | IFRAME Object
Members
Creates inline floating frames.
Properties
Methods
Events
onblur , onfocus
Collections
Behaviors
Styles
border-top-colorwidthmargin-topborder-bottom-
widthborder-bottompadding-
rightfloatdisplaypaddingmargin-rightborder-right-
widthcursorbehaviorborder-top-
stylebottomvisibilityclipborder-left-colormargin-lefttext-
autospaceleftoverflow-xoverflow-yborder-styleborder-
topborder-top-widthborder-bottom-colormargin-
bottompositionclearborder-left-styleborder-right-
colorborder-rightmarginborder-widthtoppadding-
leftborder-bottom-stylelayout-gridborder-left-
widthborder-leftheightlayout-grid-modepadding-
toppadding-bottomborder-colorborder-right-
styleborderright
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
anchors Collection DHTML Collections
Web Workshop | DHTML, HTML & CSS
all Collection
Returns a reference to the collection of elements contained by the object.
Syntax
[ collAll = ] object.all
[ oObject = ] object.all(vIndex [, iSubIndex])
Possible Values
Members
Remarks
The all collection includes one element object for each valid HTML tag. If
a valid tag has a matching end tag, both tags are represented by the
same element object.
Example
This example in JScript shows how to use the item method on the all
collection to retrieve all element objects for which the name property or
ID attribute is set to sample. Depending on the number of times the
name or ID is defined in the document, the item method returns null, a
single element object, or a collection of element objects. The value of the
length property of the collection determines whether item returns a
collection or a single object.
Applies To
A, ACRONYM, ADDRESS, APPLET, AREA, B, BASE, BASEFONT, BDO, BGSOUND, BIG, BLOCKQUOTE, BODY, BUTTON,
CAPTION, CENTER, CITE, CODE, COL, COLGROUP, custom, DD, DEL, DFN, DIR, DIV, DL, document, DT, EM, EMBED,
FIELDSET, FONT, FORM, FRAME, FRAMESET, HEAD, Hn, HR, HTML, I, IFRAME, IMG, INS, KBD, LABEL, LEGEND, LI, LINK,
LISTING, MAP, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, Q, S, SAMP, SCRIPT, SELECT, SMALL, SPAN, STRIKE,
STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TITLE, TR, TT, U, UL, VAR, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
Web Workshop | DHTML, HTML & CSS
IMG Element | IMG Object Members
Embeds an image or a video clip in the document.
Properties
Methods
Collections
Behaviors
Styles
border-top-colorwidthmargin-topborder-bottom-
widthpadding-rightpaddingborder-right-
widthcursorvertical-alignfiltervisibilityfont-styleborder-
left-colormargin-lefttext-autospaceleftfont-
variantbackgrounddirectionborder-bottom-
colorpositionbackground-positionclearborder-right-
colorborder-rightword-spacingtoppadding-leftlayout-
grid-modeheightpadding-bottomrightborder-
bottomletter-spacingdisplayfloatfont-familymargin-
rightbehaviorbackground-repeatborder-top-
stylebackground-imagebottomclipborder-styleborder-
top-widthborder-topmargin-bottomfontborder-left-
styleborder-widthmarginunicode-bidibackground-
colorfont-weightline-heightborder-bottom-stylelayout-
gridborder-left-widthborder-leftpadding-topborder-
colorborder-right-styleborder
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
type Property TYPE Attribute | type Pro... DHT
Web Workshop | DHTML, HTML & CSS
TYPE Attribute | type Property
Retrieves the type of intrinsic control represented by the object.
Syntax
Possible Values
The property is read-only with a default value of text for the INPUT element, select-
one for the SELECT element, and textarea for the TEXTAREA element.
Applies To
INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=hidden, INPUT type=image, INPUT type=password, INPUT type=radio,
INPUT type=reset, INPUT type=submit, INPUT type=text, SELECT, TEXTAREA
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
Web Workshop | DHTML, HTML & CSS
INS Element | INS Object Members
Specifies text that has been inserted into the document.
Properties
Methods
Events
Collections
Styles
widthdirectionoverflowpadding-
rightdisplaypaddingunicode-bidibehaviorpadding-
leftlayout-gridlayout-grid-modetext-autospacepadding-
topoverflow-xpadding-bottomoverflow-y
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
table-layout Attribute | ... tagUrn Property DH
Web Workshop | DHTML, HTML & CSS
tagName Property
Retrieves the tag name of the object.
Syntax
HTML N/A
Scripting [ sName = ] object.tagName
Possible Values
Example
This example retrieves the tag name of an object that has the identifier specified in the
prompt window.
<SCRIPT>
var idValue = window.prompt("Get the tag with this ID:;
if (idValue != null) {
alert(document.all[idValue].tagName)
}
</SCRIPT>
Applies To
A, ACRONYM, ADDRESS, APPLET, AREA, B, BASE, BASEFONT, BDO, BGSOUND, BIG, BLOCKQUOTE, BODY, BR, BUTTON, CAPTION, CENTER, CITE,
CODE, COL, COLGROUP, COMMENT, custom, DD, DEL, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, FRAME, FRAMESET, HEAD, Hn,
HR, HTML, I, IFRAME, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=hidden, INPUT type=image, INPUT
type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, INS, KBD, LABEL, LEGEND, LI, LINK, LISTING, MAP,
MARQUEE, MENU, META, NEXTID, NOBR, OBJECT, OL, OPTION, P, PLAINTEXT, PRE, Q, RT, RUBY, S, SAMP, SCRIPT, SELECT, SMALL, SPAN,
STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TITLE, TR, TT, U, UL, VAR, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
Web Workshop | DHTML, HTML & CSS
ISINDEX Element | ISINDEX Object
Members
Causes the browser to display a dialog window that prompts
the user for a single line of input.
Properties
Methods
Events
Collections
behaviorUrns
Behaviors
Styles
border-top-colormargin-topfont-sizeborder-bottom-
widthborder-bottompage-break-beforeletter-
spacingfloatfont-familymargin-rightborder-right-
widthbehaviortext-transformbackground-repeatborder-
top-stylebackground-imagebottomtext-
indentvisibilityfont-styleclipborder-left-colormargin-
lefttext-autospaceleftfont-varianttext-
decorationbackgroundborder-stylecolorborder-
topborder-top-widthz-indexborder-bottom-colormargin-
bottompage-break-afterpositionbackground-
positionclearfontborder-left-styleborder-right-
colorborder-rightmarginborder-widthfont-
weightbackground-colorword-spacingline-
heighttopborder-bottom-styleheightborder-left-
widthborder-leftborder-colorborderborder-right-
styleright
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Web Workshop | DHTML, HTML & CSS
KBD Element | KBD Object Members
Renders text in a fixed-width font.
Properties
Methods
Events
onbeforecut , onbeforepaste , onblur , onclick ,
oncontextmenu , oncut , ondblclick , ondrag ,
ondragend , ondragenter , ondragleave , ondragover ,
ondragstart , ondrop , onfocus , onhelp , onkeydown ,
onkeypress , onkeyup , onlosecapture , onmousedown ,
onmousemove , onmouseout , onmouseover ,
onmouseup , onpaste , onpropertychange ,
onreadystatechange , onresize , onselectstart
Collections
Behaviors
Styles
widthfont-sizeoverflowpadding-rightletter-
spacingfloatdisplaypaddingfont-
familycursorbehaviortext-transformbackground-
repeatbackground-imagebottomvisibilityfont-
stylecliptext-autospaceleftoverflow-xfont-varianttext-
decorationoverflow-ybackgroundcolordirectionz-
indexpositionbackground-positionclearfontunicode-
bidibackground-colorfont-weightword-spacingline-
heighttoppadding-leftlayout-gridlayout-grid-
modepadding-toppadding-bottomright
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
FOR Attribute | htmlFor P... htmlText Property
Web Workshop | DHTML, HTML & CSS
FOR Attribute | htmlFor Property
Sets or retrieves the object to which the given label object is assigned.
Syntax
Possible Values
sID String that specifies the identifier of the element to which the label element is assigned.
LABEL
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
@media Rule ACTION Attribute | action... DH
Web Workshop | DHTML, HTML & CSS
ACCESSKEY Attribute | accessKey Property
Sets or retrieves the accelerator key for the object.
Syntax
Possible Values
By default, the accessKey property sets focus to the object. The object receives focus
when the user simultaneously presses the ALT key and the accelerator key assigned to
an object. Some controls perform an action after receiving focus. For example, using
accessKey on a button causes the onclick event to fire. By comparison, applying the
accessKey on a radio button causes the onclick event to fire and toggles the
checked property, visibly selecting or deselecting the control.
Example
This example uses the LABEL object and the accessKey property to set focus on a
text box. The rich text support in the LABEL object makes it possible to underline the
designated accessKey.
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
A, ACRONYM, ADDRESS, APPLET, AREA, B, BDO, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, custom, DD, DEL, DFN, DIR, DIV,
DL, DT, EM, EMBED, FIELDSET, FONT, Hn, HR, I, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT
type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, INS, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING,
MARQUEE, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, Q, RT, RUBY, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE,
TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
onchange Event oncontextmenu Event DHTM
Web Workshop | DHTML, HTML & CSS
onclick Event
Fires when the user clicks the left mouse button on the object.
Syntax
Remarks
Bubbles Yes
Cancels Yes
To
invoke Click the object.
Invoke the click method.
Press the ENTER key in a form.
Press the access key for a control.
Select an item in a combo box or list box by clicking the left mouse button or by pressing the arrow keys and then pressing the
ENTER key.
Default Initiates any action associated with the object. For example, if the user clicks an A object, the browser loads the document specified by
action the href property. To cancel the default behavior, set the returnValue property of the event object to FALSE.
If the user clicks the left mouse button, the onclick event for an object occurs only if
the mouse pointer is over the object and an onmousedown and an onmouseup event
occur in that order. For example, if the user clicks the mouse on the object but moves
the mouse pointer away from the object before releasing, no onclick event occurs.
The onclick event changes the value of a control in a group. This change initiates the
event for the group, not for the individual control. For example, if the user clicks a
radio button or check box in a group, the onclick event occurs after the
onbeforeupdate and onafterupdate events for the control group.
If the user clicks an object that can receive the input focus but does not already have
the focus, the onfocus event occurs for that object before the onclick event. If the
user double-clicks the left mouse button in a control, an ondblclick event occurs
immediately after the onclick event.
Although the onclick event is available on a large number of HTML elements, if a Web
page is to be accessible to keyboard users, you should restrict its use to the A, INPUT,
AREA, and BUTTON elements. These elements automatically allow keyboard access
through the TAB key, making Web pages that use the elements accessible to keyboard
users. For more information, please see the section on writing accessible Dynamic
HTML.
Although event handlers in the DHTML Object Model do not receive parameters
directly, the handler can query the event object for data.
Example
The following examples show how to use the onclick event handlers for the document.
Applies To
A, ADDRESS, APPLET, AREA, B, BDO, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, custom, DD, DFN, DIR, DIV, DL,
document, DT, EM, EMBED, FIELDSET, FONT, FORM, Hn, HR, I, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT
type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, KBD, LABEL, LEGEND, LI,
LISTING, MAP, MARQUEE, MENU, NEXTID, NOBR, OBJECT, OL, P, PLAINTEXT, PRE, RT, RUBY, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG,
SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP
See Also
click
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
Web Workshop | DHTML, HTML & CSS
LABEL Element | LABEL Object Members
Specifies a label for another element on the page.
Properties
Methods
Events
onbeforecopy , onbeforecut , onbeforepaste , onblur ,
onclick , oncontextmenu , oncut , ondblclick , ondrag ,
ondragend , ondragenter , ondragleave , ondragover ,
ondragstart , ondrop , onfocus , onhelp , onkeydown ,
onkeypress , onkeyup , onlosecapture , onmousedown ,
onmousemove , onmouseout , onmouseover ,
onmouseup , onpaste , onpropertychange ,
onreadystatechange , onresize , onselectstart
Collections
Behaviors
Styles
widthfont-sizeoverflowpadding-rightletter-
spacingfloatdisplaypaddingfont-
familycursorbehaviortext-transformbackground-
repeatbackground-imagebottomvisibilityfont-
stylecliptext-autospaceleftoverflow-xfont-varianttext-
decorationoverflow-ybackgroundcolordirectionz-
indexpositionbackground-positionclearfontunicode-
bidibackground-colorfont-weightword-spacingline-
heighttoppadding-leftlayout-gridlayout-grid-
modepadding-toppadding-bottomright
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Web Workshop | DHTML, HTML & CSS
LEGEND Element | LEGEND Object
Members
Inserts a caption into the box drawn by the FIELDSET
object.
Properties
Methods
Collections
Behaviors
Styles
widthfont-sizeoverflowpadding-rightletter-
spacingfloatdisplaypaddingfont-
familycursorbehaviorword-breaktext-
transformbackground-repeatbackground-
imagebottomvisibilityfont-stylecliptext-
autospaceleftoverflow-xfont-varianttext-
decorationoverflow-yline-
breakbackgroundcolordirectionz-indextext-
justifypositionbackground-positionclearfontunicode-
bidibackground-colorfont-weightword-spacingline-
heighttoppadding-leftlayout-gridlayout-grid-
modepadding-toppadding-bottomright
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
TRUESPEED Attribute | tru... type Property D
Web Workshop | DHTML, HTML & CSS
TYPE Attribute | type Property
Sets or retrieves the style of the list.
Syntax
Possible Values
The property is read/write with a default value of 1 for an ordered list and a default
value of disc for an unordered list.
This example uses the TYPE attribute to set the line item markers to lowercase Roman
numerals.
<OL TYPE="i">
<LI>First Item
<LI>Second Item
<LI>Third Item
</OL>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the
latest version. Then reload this page to view the sample.
Applies To
LI, OL, UL
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
Web Workshop | DHTML, HTML & CSS
LI Element | LI Object Members
Denotes one item in a list.
Properties
Methods
Events
onbeforecopy , onbeforecut , onbeforepaste , onblur ,
onclick , oncontextmenu , oncopy , oncut , ondblclick ,
ondrag , ondragend , ondragenter , ondragleave ,
ondragover , ondragstart , ondrop , onfocus , onhelp ,
onkeydown , onkeypress , onkeyup , onlosecapture ,
onmousedown , onmousemove , onmouseout ,
onmouseover , onmouseup , onpaste ,
onpropertychange , onreadystatechange , onresize ,
onselectstart
Collections
Behaviors
Styles
border-top-colorwidthmargin-topborder-bottom-
widthpage-break-beforepadding-rightpaddingborder-
right-widthcursortext-indentvisibilityfont-styleborder-
left-colormargin-lefttext-autospaceleftoverflow-xlayout-
grid-linefont-variantoverflow-ylist-styleline-breaklist-
style-typebackgroundtext-alignlist-style-
imagedirectionborder-bottom-colortext-
justifypositionbackground-positionclearborder-right-
colorborder-rightword-spacingtoppadding-leftlayout-
grid-modepadding-bottomrightfont-sizeborder-
bottomoverflowletter-spacingdisplayfloatfont-
familymargin-rightbehaviorword-breaktext-
transformbackground-repeatborder-top-stylelayout-
grid-charlist-style-positionbackground-
imagebottomcliptext-decorationcolorborder-styleborder-
top-widthborder-topz-indexmargin-bottompage-break-
afterfontborder-left-styleborder-widthmarginunicode-
bidibackground-colorfont-weightline-heightborder-
bottom-stylelayout-gridlayout-grid-typelayout-grid-
char-spacingborder-left-widthborder-leftpadding-
topborder-colorborder-right-styleborder
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Web Workshop | DHTML, HTML & CSS
LINK Element | LINK Object Members
Enables the current document to establish links to external
documents.
Properties
Methods
Events
onload , onreadystatechange
Collections
Behaviors
clientCaps , download , homePage
Styles
widthbehaviortext-autospace
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
Web Workshop | DHTML, HTML & CSS
LISTING Element | LISTING Object
Members
Renders text in a fixed-width font.
Properties
Methods
Collections
Behaviors
Styles
border-top-colormargin-topborder-bottom-widthpage-
break-beforepadding-rightpaddingborder-right-
widthcursortext-indentvisibilityfont-styleborder-left-
colormargin-lefttext-autospaceleftoverflow-xlayout-grid-
linefont-variantoverflow-yline-breakbackgroundtext-
aligndirectionborder-bottom-colortext-
justifypositionbackground-positionclearborder-right-
colorborder-rightword-spacingtoppadding-leftlayout-
grid-modepadding-bottomrightfont-sizeborder-
bottomoverflowletter-spacingdisplayfloatfont-
familymargin-rightbehaviorword-breaktext-
transformbackground-repeatborder-top-stylelayout-
grid-charbackground-imagebottomcliptext-
decorationcolorborder-styleborder-top-widthborder-
topz-indexmargin-bottompage-break-afterfontborder-
left-styleborder-widthmarginunicode-bidibackground-
colorfont-weightline-heightborder-bottom-stylelayout-
gridlayout-grid-typelayout-grid-char-spacingborder-left-
widthborder-leftpadding-topborder-colorborder-right-
styleborder
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
HREF Attribute | href Pro... HSPACE Attribute |
Web Workshop | DHTML, HTML & CSS
href Property
Sets or retrieves the entire URL as a string.
Syntax
HTML N/A
Scripting location.href [ = sURL ]
Possible Values
This example shows a select list of URLs. The user is taken to the URL selected from
the options, if the selection is different from the list's default value.
<SELECT
onchange="window.location.href=this.options[this.selectedIndex].
value">
<OPTION VALUE="http://www.microsoft.com/ie">Internet
Explorer</OPTION>
<OPTION VALUE="http://www.microsoft.com">Microsoft Home</OPTION>
<OPTION VALUE="http://msdn.microsoft.com">Developer
Network</OPTION>
</SELECT>
Applies To
HTML N/A
Scripting location
See Also
navigate
Did you find this topic useful? Suggestions for other topics? write us!
I
© 1999 microsoft corporation. all rights reserved. terms of use .
I
Web Workshop | DHTML, HTML & CSS
location Object Members
Contains information about the current URL.
Properties
Methods
Did you find this topic useful? Suggestions for other topics?
write us!
I
© 1999 microsoft corporation. all rights reserved. terms of
use .
I
URN Attribute | urn Prope... userAgent Property
Web Workshop | DHTML, HTML & CSS
USEMAP Attribute | useMap Proper