You are here: Reference > CSS > properties > behavior

behavior property

Browser support:
Sets the URL of a behavior file.
With the behavior property you can attach HTA or HTC files to style declarations. These files are useful to create custom elements, with custom functionality. For more information, visit the behavior (MSDN) page.
JavaScript page for this property: behavior. You can find other example(s) there.

Possible values:

 Any of the following values (use the space character to separate them, each value can be used arbitrary times): 
Where behaviorName specifies the name of an Internet Explorer default behavior.
Where objID specifies the value of an object element's id attribute.
Where URI specifies the location of the behavior file.
Default: this property has no default value.

Example HTML code 1:

This example illustrates the use of the behavior property:
        .example {
            behavior: url("")
    <span class="example">Move the mouse over this text (element with behavior)</span><br />
    <span>Move the mouse over this text (element without behavior)</span>
Did you find this example helpful? yes no

Supported by tags:

External links:

User Contributed Comments

Post Content

Post Content