Writes the text specified in the text attribute to the 'body' section of a generated HTML page. The cfhtmlbody tag can be useful for embedding JavaScript code, or placing other HTML tags that should go at the bottom of the page just before the closing body tag.
<cfhtmlbody>
cfhtmlbody() {}
append
append
read
reset
write
flush
Lucee tag wrap
<cfhtmlbody><h1>Hello World</h1></cfhtmlbody>
<cfhtmlbody text='<h1>Hello World</h1>' />'>
cfhtmlbody( text='<h1>Hello World</h1>');
Overwriting, reading, flushing
<cfhtmlbody action="write"><h1>Overwrite Body Buffer</h1></cfhtmlbody>
<cfhtmlbody action="read" variable="body"></cfhtmlbody>
<cfoutput><b>#body#</b></cfoutput>
<cfhtmlbody action="reset" />
<cfhtmlbody><h1>New Body</h1></cfhtmlbody>
<cfhtmlbody action="flush" />
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.