---
title: documentTidyHTML
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/xmlnode/options/documenttidyhtml
---

# documentTidyHTML

Formats HTML into valid XHTML during processing of the document.

## Declaration

```swift
static var documentTidyHTML: XMLNode.Options { get }
```

## Discussion

Discussion When tidying, NSXMLDocument adds a line break before the close tag of a block-level element (<p>, <div>, <h1>, and so on); it also makes the string value of <br> or <hr> a line break. These operations make the string value of the HTML <body> more readable. After using this option, avoid outputting the document as anything other than the default kind, NSXMLDocumentXHTMLKind. (Input)

## See Also

### Constants

- [documentTidyXML](foundation/xmlnode/options/documenttidyxml.md)
- [documentValidate](foundation/xmlnode/options/documentvalidate.md)
- [documentXInclude](foundation/xmlnode/options/documentxinclude.md)
- [documentIncludeContentTypeDeclaration](foundation/xmlnode/options/documentincludecontenttypedeclaration.md)
