# html5-tag

> A simple utility for creating HTML5 tags.

Latest version **0.3.0** (published 2016-06-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install html5-tag
pnpm add html5-tag
yarn add html5-tag
bun add html5-tag
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2016-06-13 |
| First published | 2016-06-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Cheton Wu |
| Maintainers | cheton |
| Keywords | attr, attribute, attributes, element, elements, generate, html, html5, tag |

## Links

- npm: https://www.npmjs.com/package/html5-tag
- Repository: https://github.com/cheton/html5-tag
- Issues: https://github.com/cheton/html5-tag/issues
- npm.io page: https://npm.io/package/html5-tag

## Dependencies (1)

- [escape-html](https://npm.io/package/escape-html.md) ^1.0.3

## 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

- 0.3.0 (latest) — 2016-06-13

## README

# html5-tag [![build status](https://travis-ci.org/cheton/html5-tag.svg?branch=master)](https://travis-ci.org/cheton/html5-tag) [![Coverage Status](https://coveralls.io/repos/cheton/html5-tag/badge.svg)](https://coveralls.io/r/cheton/html5-tag)
[![NPM](https://nodei.co/npm/html5-tag.png?downloads=true&stars=true)](https://nodei.co/npm/html5-tag/)

A simple utility for creating HTML tags.

## Installation

```bash
npm install --save html5-tag
```

## Usage
```js
import tag from 'html5-tag';

// No end tags for void elements (https://www.w3.org/TR/html5/syntax.html#void-elements)
tag('br');
// → '<br>'

tag('a', { href: 'http://example.com' }, 'Example');
// → '<a href="http://example.com">Example</a>'

tag('input', { name: 'name', value: 'Input your name...', disabled: true });
// → '<input name="name" value="Input your name..." disabled>'

tag('div', { title: '\'"&<>' }, tag('i', { class: 'icon icon-folder' }, ''));
// → '<div title="&#39;&quot;&amp;&lt;&gt;"><i class="icon icon-folder"></i></div>'

// Defaults to 'div' if tag is not specified
tag({ class: 'container' }, 'container text');
// → '<div class="container">container text</div>'
```

## License

Copyright (c) 2016 Cheton Wu

Licensed under the [MIT License](LICENSE).

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