# HTML Response Example

> See a working example of returning HTML content using g.res.contentType = HTML in API Maker APIs.

Source: https://docs.apimaker.dev/v1/examples/res/contentType/HTML.html

## HTML

**Content type HTML**

```typescript
g.res.contentType = T.EContentType.HTML;
return "<!DOCTYPE html><html><body><h1>My First Heading </h1><p> My first paragraph.</p></body></html>";
```

Response
```html
<!DOCTYPE html><html><body><h1>My First Heading </h1><p> My first paragraph.</p></body></html>
```

## Related

- [The global object g](https://docs.apimaker.dev/v1/docs/pre-defined-terms/global-object-g.html) · [Custom APIs](https://docs.apimaker.dev/v1/docs/apis-all/custom-apis/user-created-custom-api.html)
