# html-beautify

> Inserts spaces and line breaks into html string.

Latest version **1.0.4** (published 2017-01-02) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install html-beautify
pnpm add html-beautify
yarn add html-beautify
bun add html-beautify
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2017-01-02 |
| First published | 2016-12-30 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Igor Sterjakov |
| Maintainers | sterjakov |
| Keywords | html, beautify, pareser, pretty, beautifier, prettifier |

## Links

- npm: https://www.npmjs.com/package/html-beautify
- Repository: https://github.com/sterjakovigor/extend-with
- Homepage: https://github.com/sterjakovigor/html-beautifier#readme
- Issues: https://github.com/sterjakovigor/html-beautifier/issues
- npm.io page: https://npm.io/package/html-beautify

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 1.0.4 (latest) — 2017-01-02
- 1.0.3 — 2017-01-02
- 1.0.2 — 2017-01-02
- 1.0.1 — 2016-12-31
- 1.0.0 — 2016-12-30

## README

![alt tag](https://raw.githubusercontent.com/sterjakovigor/html-beautifier/master/logo.jpg)

# How it work?

Inserts spaces and break lines into html string. It looks like this:

```html
<!-- Before -->
<div><p>Hello <b>world</b>!</p><p>How are you?</p></div>

<!-- After -->
<div>
  <p>Hello <b>world</b>!</p>
  <p>How are you?</p>
</div>
```

# How to use?
```javascript
import htmlBeautify from 'html-beautify'
htmlBeautify("<div><p>Hello <b>world</b>!</p></div>")
// => "<div>\n  <p>Hello <b>world</b>!\n  </p>\n</div>"
```
Also you can pass string with spaces and break lines, it will be remove it and add them again.

---
_Source: https://npm.io/package/html-beautify · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
