cfhtmlhead
Description
Writes text to the head section of a generated HTML page.
Categories
Related
Syntax
<cfhtmlhead
text = "text">
Note: You
can specify this tag’s attributes in an attributeCollection attribute
whose value is a structure. Specify the structure name in the attributeCollection attribute
and use the tag’s attribute names as structure keys.
Attributes
| Attribute | Description | Required | Default |
|---|---|---|---|
| text | Text to add to the <head> area of an HTML page. | Required |
Usage
Use this tag for embedding JavaScript code, or putting other HTML tags, such as meta, link, title, or base in an HTML page header.
If you use this tag after the cfflush tag on a page, an error is thrown.
If you use this tag after the cfflush tag on a page, an error is thrown.
Example
<!--- This example adds a favicon to the HTML Head of every page view. The extra CRLF at
the end cleans up view source. Note the embedded tag uses double quotes and the cfhtmlhead
text attribute uses single quotes, but it could be the other way around too.
--->
<cfhtmlhead
text='<link href="/blog/custom/img/favicon.ico" rel="shortcut icon" type="image/x-icon">#chr(13)##chr(10)#'>