Final answer:
CloudFormation uses JSON or YAML for defining stacks and templates, not HTML or XML.
Step-by-step explanation:
The language used for defining stacks and templates in CloudFormation is either JSON (JavaScript Object Notation) or YAML (YAML Ain't Markup Language). Both of these languages provide ways to describe data structures in a text format and are widely used in configuring and managing infrastructure as code, which is at the heart of what CloudFormation does. HTML and XML are not used for this purpose within CloudFormation.