---
title: "HtmlSettings"
canonical_url: "https://www.nutrient.io/api/python/settings/format/html-settings/"
md_url: "https://www.nutrient.io/api/python/settings/format/html-settings.md"
last_updated: "2026-06-12T15:43:20.748Z"
description: "Settings for Html. Values fall back through three levels: document → SDK → built-in default."
---

Settings for Html. Values fall back through three levels: document → SDK → built-in default. Writes target the document only when set on a document's settings, otherwise the SDK globally when set on SdkSettings.

**Tags:** `Format`

```python

from nutrient_sdk import HtmlSettings

```

## Construction

`HtmlSettings` is accessed through a [`Document`](/api/python/document/) instance for per-document overrides, or via [`SdkSettings`](/api/python/settings/document/sdk-settings/) for SDK-wide defaults.

```python

# Per-document override

with Document.open("input.pdf") as doc:
    settings = doc.settings.html_settings
    settings.some_field = new_value          # mutate fields directly

# SDK-wide default (applies to all documents)

SdkSettings.html_settings.some_field = new_value

```

Settings are configured by writing to fields on the returned object. The settings property itself cannot be reassigned — `doc.settings.html_settings = other_settings` is rejected.

## Properties

### image_export

```python

@property
def image_export(self) -> ImageExportMode

@image_export.setter
def image_export(self, value: ImageExportMode) -> None

```

Controls how images are exported when converting documents to HTML.

**Type:** [`ImageExportMode`](/api/python/enums/image-export-mode/)

**Default:** `ImageExportMode.Embedded`

---

### layout

```python

@property
def layout(self) -> HtmlLayoutType

@layout.setter
def layout(self, value: HtmlLayoutType) -> None

```

The layout type to use when saving HTML documents.

**Type:** [`HtmlLayoutType`](/api/python/enums/html-layout-type/)

**Default:** `HtmlLayoutType.PageLayout`

---

---

## Related pages

- [Per-document override](/api/python/settings/format/email-settings.md)
- [Per-document override](/api/python/settings/format/image-settings.md)
- [Format](/api/python/settings/format.md)
- [Per-document override](/api/python/settings/format/cad-settings.md)
- [Per-document override](/api/python/settings/format/pdf-settings.md)
- [Per-document override](/api/python/settings/format/jpeg-settings.md)
- [Per-document override](/api/python/settings/format/spreadsheet-settings.md)
- [Per-document override](/api/python/settings/format/markdown-settings.md)
- [Per-document override](/api/python/settings/format/word-settings.md)

