https://github.com/hexlet-components/js-html-builder
https://github.com/hexlet-components/js-html-builder
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/hexlet-components/js-html-builder
- Owner: hexlet-components
- Created: 2016-07-11T06:01:35.000Z (almost 10 years ago)
- Default Branch: main
- Last Pushed: 2025-07-21T23:09:03.000Z (11 months ago)
- Last Synced: 2025-09-16T17:58:46.132Z (10 months ago)
- Language: JavaScript
- Size: 1.79 MB
- Stars: 1
- Watchers: 9
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# js-html-builder
[](../../actions)
## Install
```sh
npm install @hexlet/html-builder
```
## Usage example
```javascript
import parse from '@hexlet/html-builder';
const data = ['html', [
['head', [
['title', 'hello, hexlet!'],
]],
['body', [
['div', { class: 'separator' }],
['h1', { class: 'header' }, 'html builder example'],
['div', [
['img', { class: 'image', href: '#' }],
['span', 'span text2'],
]],
]],
]];
const ast = parse(data);
ast.toString();
// '
// hello, hexlet!
//
// html builder example
//
span text2
// '
```
For more information, see the [Full Documentation](docs)
---
[](https://hexlet.io?utm_source=github&utm_medium=link&utm_campaign=js-html-builder)
This repository is created and maintained by the team and the community of Hexlet, an educational project. [Read more about Hexlet](https://hexlet.io?utm_source=github&utm_medium=link&utm_campaign=js-html-builder).
See most active contributors on [hexlet-friends](https://friends.hexlet.io/).