Attributes can be assigned in similar fashion to output:
Elixir expressions can be used as attribute values using the interpolation syntax:
Boolean attributes can be set using boolean values:
There is a literal syntax for class and id attributes:
Elixir can be written inline using - and =.
- evalutes the expression.
= evalutes the expression, and inserts the value of the expression.
The interpolation syntax can be used to insert expressions into text:
Lines can be commented out using the `/` character:
HTML comments can be inserted using /!
We can use the regular Elixir flow control such as the if expression:
There are shortcuts for common doctypes:
Elixir's collection manipulation expressions can be used to iterate over collections in your templates: