You can put variables, functions, or expressions inside tag attributes by enclosing the variable or expression with number signs. For example, if the variable CookieValue has the value "MyCookie", the following line sets the cfcookie value attribute to "The value is MyCookie":
<cfcookie name="TestCookie" value="The value is #CookieValue#">
You can optionally omit quotation marks around variables used as attribute values as shown in the following example:
<cfcookie name = TestCookie value = #CookieValue#>
However, surrounding all attribute values in quotation marks is more consistent with HTML coding style.
If you use string expressions to construct an attribute value, as shown in the following example, the strings inside the expression use single quotation marks (') to differentiate the quotation marks from the quotation marks that surround the attribute value.
<cfcookie name="TestCookie2" value="The #CookieValue & 'ate the cookie!'#">