---
schema_version: "1"
id: 6bdb44533960b31942569aad4e141135c68ad7263062f8fd32c42b45770edc95
title: IsChtmlBrowser()
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/ampscript/references/fun_http/mc-ampscript-reference-http-is-chtml-browser.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-http/mc-ampscript-reference-http-is-chtml-browser.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 8b5574c79e98276f4b89467faeeaebcdaafd553df0a786f6f271bdd7f157f15b
products:
  - AMPscript for Marketing Cloud
  - Marketing Cloud
---
# IsChtmlBrowser()

Returns a value that indicates if a device's user agent is a CHTML browser.

CHTML or Compact HTML is a variant of HTML that was designed for use on non-smart feature phones, and on early smartphones and PDAs. It was intended to display information about smaller screens with fewer resources. This function was intended for use with landing pages to determine whether to
display standard HTML content or CHTML content.

**note:** The CHTML standard was superseded in the early 2000s and is now rarely used. This documentation is maintained for historical purposes.

## Availability

<table>
  <tr>
    <td>Marketing Cloud Engagement</td>
    <td>✅ Yes</td>
  </tr>
  <tr>
    <td>Marketing Cloud Next</td>
    <td>❌ No</td>
  </tr>
</table>

## Syntax

```
IsChtmlBrowser(userAgentHeader)
```

The `IsChtmlBrowser()` function has one parameter:

- `userAgentHeader` (string): Required. An HTTP user-agent header string.

## Usage

To use the function, pass it an HTTP user-agent header string. This example checks to see if a pre-defined string supports CHTML.

```
%%[
  IsChtmlBrowser("Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/117.0")
]%%
```

The function returns `false` because the user agent corresponds to a modern desktop web browser.

You can combine this function with other AMPscript functions. This example uses the `HttpRequestHeader()` function to return the browser user-agent value from the current browser.

```
%%[
  IsChtmlBrowser(HttpRequestHeader("user-agent"))
]%%
```

The function returns the appropriate value for the provided user-agent value.

## See Also

- [HttpRequestHeader()](https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-http/mc-ampscript-reference-http-request-header.md)
