ColdFusion is a simple language to learn and use primarily because it employs a tag-based syntax, which makes the transition between HTML (the language that your Web browser uses to render content) and CFML (ColdFusion Markup Language, the language that ColdFusion uses to generate that content from dynamic data) within your code very natural. Take, for example, the following HTML listing of companies (no CFML is in this code):
<td>The Very Big Corporation of America</td>
<td>Ma's Homemade Pies</td>
By using ColdFusion's tag-based syntax, you can easily generate this table dynamically from data stored in your database (the CFML is boldfaced in the following example), as follows:
<cfquery name="GetCompanies" datasource="MyDatabase">
SELECT CompanyID, CompanyName
Basically, ColdFusion performs a query against the MyDatabase datasource (an object that connects to and communicates with a database) and names the data result set (the data that results from performing the query) GetCompanies. Then, for each row in the GetCompanies query, ColdFusion outputs the HTML markup used to format an HTML table row containing two table cells. The first table cell contains the value of CompanyID, and the second table cell contains the value of CompanyName from the current row in the result set.