[Haml] Mention the new attribute syntax in the README.

This commit is contained in:
Nathan Weizenbaum 2009-07-04 15:46:34 -07:00
parent e9714ea91b
commit 3b36078c15
1 changed files with 5 additions and 1 deletions

View File

@ -57,11 +57,15 @@ check out the [YARD documentation](http://haml-lang.com/docs/yardoc).
### Haml
The most basic element of Haml
is a shorthand for creating HTML
is a shorthand for creating HTML:
%tagname{:attr1 => 'value1', :attr2 => 'value2'} Contents
No end-tag is needed; Haml handles that automatically.
If you prefer HTML-style attributes, you can also use:
%tagname(attr1='value1' attr2='value2') Contents
Adding `class` and `id` attributes is even easier.
Haml uses the same syntax as the CSS that styles the document: