-#### `colspan` and `colSpan`
+Sometimes there are differences between the name of property and an attribute.
-Notice the difference between the `colspan` attribute and the `colSpan` property.
-
-If you wrote something like this:
-
-
- <tr><td colspan="{{1 + 1}}">Three-Four</td></tr>
-
-
-You'd get this error:
-
-
- Template parse errors:
- Can't bind to 'colspan' since it isn't a known native property
-
-
-As the message says, the `
` element does not have a `colspan` property. This is true
-because `colspan` is an attribute—`colSpan`, with a capital `S`, is the
-corresponding property. Interpolation and property binding can set only *properties*, not attributes.
-
-Instead, you'd use property binding and write it like this:
-
-
+`colspan` is an attribute of ` | `, while `colSpan` with a capital "S" is a property.
+When using attribute binding, use `colspan` with a lowercase "s".
+For more information on how to bind to the `colSpan` property, see the [`colspan` and `colSpan`](guide/property-binding#colspan) section of [Property Binding](guide/property-binding).
@@ -66,28 +78,32 @@ Instead, you'd use property binding and write it like this:
{@a class-binding}
-## Class binding
+## Binding to the `class` attribute
-Here's how to set the `class` attribute without a binding in plain HTML:
+You can use class binding to add and remove CSS class names from an element's `class` attribute.
-```html
-
-Some text
-```
+### Binding to a single CSS `class`
-You can also add and remove CSS class names from an element's `class` attribute with a **class binding**.
+To create a single class binding, use the prefix `class` followed by a dot and the name of the CSS class—for example, `[class.sale]="onSale"`.
+Angular adds the class when the bound expression, `onSale` is truthy, and it removes the class when the expression is falsy—with the exception of `undefined`.
+See [styling delegation](guide/style-precedence#styling-delegation) for more information.
-To create a single class binding, start with the prefix `class` followed by a dot (`.`) and the name of the CSS class (for example, `[class.foo]="hasFoo"`).
-Angular adds the class when the bound expression is truthy, and it removes the class when the expression is falsy (with the exception of `undefined`, see [styling delegation](#styling-delegation)).
+### Binding to multiple CSS classes
-To create a binding to multiple classes, use a generic `[class]` binding without the dot (for example, `[class]="classExpr"`).
-The expression can be a space-delimited string of class names, or you can format it as an object with class names as the keys and truthy/falsy expressions as the values.
-With object format, Angular will add a class only if its associated value is truthy.
+To bind to multiple classes, use `[class]` set to an expression—for example, `[class]="classExpression"`.
+The expression can be a space-delimited string of class names, or an object with class names as the keys and truthy or falsy expressions as the values.
+With an object format, Angular adds a class only if its associated value is truthy.
-It's important to note that with any object-like expression (`object`, `Array`, `Map`, `Set`, etc), the identity of the object must change for the class list to be updated.
-Updating the property without changing object identity will have no effect.
+
-If there are multiple bindings to the same class name, conflicts are resolved using [styling precedence](#styling-precedence).
+With any object-like expression—such as `object`, `Array`, `Map`, or `Set`—the identity of the object must change for Angular to update the class list.
+Updating the property without changing object identity has no effect.
+
+
+
+If there are multiple bindings to the same class name, Angular uses [styling precedence](guide/style-precedence) to determine which binding to use.
+
+The following table summarizes class binding syntax.