# get-tag

> Create HTML tag strings on the fly.

Latest version **0.1.10** (published 2023-10-22) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: has types; no vulnerabilities; high quality score.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.10 |
| Published | 2023-10-22 |
| First published | 2022-04-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Tanner Dolby |
| Maintainers | tannerdolby |
| Keywords | html-tags, html-element, get-html-tag, create-html-tag, typescript |

## Links

- npm: https://www.npmjs.com/package/get-tag
- Repository: https://github.com/tannerdolby/get-tag
- Homepage: https://github.com/tannerdolby/get-tag#readme
- Issues: https://github.com/tannerdolby/get-tag/issues
- npm.io page: https://npm.io/package/get-tag

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.1.10 (latest) — 2023-10-22
- 0.1.9 — 2023-05-19
- 0.1.8 — 2023-05-19
- 0.1.7 — 2023-01-21
- 0.1.6 — 2023-01-21
- 0.1.5 — 2023-01-18
- 0.1.4 — 2022-04-24
- 0.1.3 — 2022-04-24
- 0.1.2 — 2022-04-22
- 0.1.1 — 2022-04-22
- 0.1.0 — 2022-04-22

## README

# get-tag
Create HTML tag strings on the fly.

## Installation
Install the package from [npm](https://www.npmjs.com/package/get-tag):

```bash
npm install get-tag
```

## Usage
```js
const getTag = require('get-tag');

console.log(getTag('title', 'Some Title'));
// <title>Some Title</title>

console.log(getTag('a', 'Some Link', {href: 'foo.com'}));
// <a href="foo.com">Some link</a>

console.log(getTag('meta', null, {name: 'author', content: 'foo'}));
// <meta name="author" content="foo">
```

If the provided HTML tag name is included in the [void-elements](https://www.w3.org/TR/2011/WD-html-markup-20110113/syntax.html#void-elements) list, then `selfClosing` will be set to `true`.

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