2.3 Hello Velocity World!

Once a value has been assigned to a variable, you can reference the variable anywhere in your HTML document. In the following example, a value is assigned to $foo and later referenced.

<html><body>
#set( $name = "Velocity" )
Hello $name World!
</body></html>

The result is a web page that reads

Hello Velocity World!

To make statements containing VTL directives more readable, we encourage you to start each VTL statement on a new line, although you are not required to do so.