# Binding syntax
Data binding automatically keeps your page up-to-date based on your application's state.
You use data binding to specify things such as the source of an image, the state of a button, or data for a particular user.
See the 
## Data binding and HTML
Developers can customize HTML by specifying attributes with string values.
In the following example, `class`, `src`, and `disabled` modify the ``, `
`, and `
` elements respectively.
```html
Plain old HTML
Save 
```
Use data binding to control things like the state of a button:
Remember that HTML attributes and DOM properties are different things, even when they have the same name.
In Angular, the only role of HTML attributes is to initialize element and directive state.
When you write a data binding, you're dealing exclusively with the DOM properties and events of the target object.
#### Example 1: an `Test Button 
```
Adding and removing the `disabled` attribute disables and enables the button.
However, the value of the attribute is irrelevant, which is why you cannot enable a button by writing `Still Disabled `.
To control the state of the button, set the `disabled` property instead.
#### Property and attribute comparison
Though you could technically set the `[attr.disabled]` attribute binding, the values are different in that the property binding must be a boolean value, while its corresponding attribute binding relies on whether the value is `null` or not.
Consider the following:
```html
  
    
      Type
     
    
      Syntax
     
    
      Category
     
   
  
     
      Interpolation 
    
      
        {{expression}}
        [target]="expression"
        bind-target="expression"
       
     
    
      One-way 
     
      
        Event
       
      
        
          (target)="statement"
          on-target="statement"
         
       
      
        One-way 
     
    
      
        Two-way
       
      
        
          [(target)]="expression"
          bindon-target="expression"
         
       
      
        Two-way
       
     
  
Binding types other than interpolation have a target name to the left of the equal sign.
The target of a binding is a property or event, which you surround with square brackets, `[]`, parentheses, `()`, or both, `[()]`.
The binding punctuation of `[]`, `()`, `[()]`, and the prefix specify the direction of data flow.
* Use `[]` to bind from source to view.
* Use `()` to bind from view to source.
* Use `[()]` to bind in a two way sequence of view to source to view.
Place the expression or statement to the right of the equal sign within double quotes, `""`.
For more information see [Interpolation](guide/interpolation) and [Template statements](guide/template-statements).
## Binding types and targets
The target of a data binding can be a property, an event, or an attribute name.
Every public member of a source directive is automatically available for binding in a template expression or statement.
The following table summarizes the targets for the different binding types.
  
    
      Type
     
    
      Target
     
    
      Examples
     
   
  
    
      Property
     
    
      Element property 
    
      src, hero, and ngClass in the following:
       
   
  
    
      Event
     
    
      Element event 
    
      click, deleteRequest, and myClick in the following:
       
   
  
    
      Two-way
     
    
      Event and property
     
    
       
   
  
    
      Attribute
     
    
      Attribute
      (the exception)
     
    
       
   
  
    
      Class
     
    
      class property
     
    
       
   
  
    
      Style
     
    
      style property