---
title: "createHtmlResponse"
source: "https://github.com/remix-run/remix/blob/8905f3943706e1f53696ab83e70a84873cabfc90/packages/response/src/lib/html.ts#L16"
---

# createHtmlResponse

## Summary

Creates an HTML [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)
that ensures the response has a valid DOCTYPE and appropriate `Content-Type` header.

## Signature

```ts
function createHtmlResponse(body: HtmlBody, init: ResponseInit): Response

```

## Parameters

### `body`

The body of the response

### `init`

The `ResponseInit` object for the response

## Returns

A `Response` object with a HTML body and the appropriate `Content-Type` header