---
schema_version: "1"
id: 5691c89da4fec29c2acae0490bdd9c89dc46c7c58936f448708512cd510b8973
title: HTML in Components
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/aura-platform/guides/aura/components/components-html.md
canonical_url: https://developer.salesforce.com/docs/platform/aura-platform/guide/components-html.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: b9e9c60c5c094f8a4fc0b88f9f7ee62e224397bab29e2127b1d87e695601c453
products:
  - Lightning Aura Components Developer Guide
  - Platform Developer Content
---

# HTML in Components

An HTML tag is treated as a first-class component by the framework. Each HTML tag is translated into an `<aura:html>` component, allowing it to enjoy the same rights and privileges as any other component.

For example, the framework automatically converts a standard HTML `<div>` tag to this component:

```nolang
<aura:html tag="div" />
```

You can add HTML markup in components. Note that you must use strict [XHTML](http://www.w3.org/TR/xhtml1/). For example, use `<br/>` instead of `<br>`. You can also use HTML attributes and DOM events, such as `onclick`.

**warning:** Some tags, like `<applet>` and `<font>`, aren’t supported.


To output pre-formatted HTML, use `aura:unescapedHTML`. For example, this is useful if you want to display HTML that is generated on the server and add it to the DOM. You must escape any HTML if necessary or your app might be exposed to security vulnerabilities.

You can pass in values from an expression, such as in `<aura:unescapedHtml value="{!v.note.body}"/>`.

`{!expression}` is the framework's expression syntax. For more information, see [Using Expressions](https://developer.salesforce.com/docs/platform/aura-platform/expr/expr-overview.md).

- **[Supported HTML Tags](https://developer.salesforce.com/docs/platform/aura-platform/ref/ref-supported-html-tags.md)**


    The framework supports most HTML tags, including the majority of HTML5 tags.

**See Also**

- [Supported HTML Tags](https://developer.salesforce.com/docs/platform/aura-platform/ref/ref-supported-html-tags.md)
- [CSS in Components](https://developer.salesforce.com/docs/platform/aura-platform/guide/components-css.md)
