HTML and CSS Reference
In-Depth Information
• A more complete discussion of behaviors, and built-in Internet Explorer behaviors
in particular, can be found at the MSDN site online (,
but you should note that, for security concerns, some behaviors have been removed
or modified over time.
• Behaviors are often bound to made-up elements when used, but this is not required.
This property defines a relationship between bound elements(s) and some code or content.
Generally, it is used to associate some scripting to various elements in a document.
binding: none | url( bindingfile )
where bindingfile is some technology such as XBL to add content or associate markup with
script code.
<!DOCTYPE html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title> behavior and binding Example </title>
<style type="text/css">
#clickable {behavior: url(; -moz-binding: url(hello.xml);
binding: url(hello.xml);}
<p> Just a regular paragraph. </p>
<p id="clickable"> I'm special click me. </p>
<p> Just a regular paragraph. </p>
The bound XBL file (hello.xml) looks like this:
<?xml version="1.0" encoding="utf-8"?>
<bindings xmlns=""
<binding id="hello">
<handler event="click" action=
"alert('Hello world from the bound XBL')" />
Search WWH ::

Custom Search