---
name: "up.Response.prototype.isHTML"
area: "API"
kind: "Instance method"
parent: "up.Response class"
visibility: "experimental"
url: "https://unpoly.com/api/up.Response.prototype.isHTML"
---
<nav aria-label="Unpoly docs">[All docs](https://unpoly.com/index.md) · [up.Response class](https://unpoly.com/api/up.Response.md)</nav>

# up.Response.prototype.isHTML()

**This feature is experimental**. Please [share](https://github.com/unpoly/unpoly/discussions) your experiences so we know what to keep or change.

Returns whether the response has a [content-type](https://unpoly.com/api/up.Response.prototype.contentType.md) for HTML or XHTML.

This method tests if the `Content-Type` header is either `text/html` or `application/xhtml+xml`. It doesn't test if the response body actually contains a valid HTML document.

---

## Return value {#return-value}

Whether the response has an HTML mime type.

Type: boolean

