# create-html-element **Repository Path**: mirrors_kevva/create-html-element ## Basic Information - **Project Name**: create-html-element - **Description**: Create a HTML element string - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-25 - **Last Updated**: 2026-05-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # create-html-element [![Build Status](https://travis-ci.org/sindresorhus/create-html-element.svg?branch=master)](https://travis-ci.org/sindresorhus/create-html-element) > Create a HTML element string ## Install ``` $ npm install create-html-element ``` ## Usage ```js const createHtmlElement = require('create-html-element'); createHtmlElement({ name: 'h1', attributes: { class: 'unicorn', rainbow: true, horse: false, number: 1, multiple: ['a', 'b'] }, value: '🦄' }); //=> '

🦄

' ``` ## API ### createHtmlElement(options) #### options Type: `Object` ##### name Type: `string`
Default: `div` HTML tag name. ##### attributes Type: `Object` HTML tag attributes. ##### value HTML tag value. ## Related - [stringify-attributes](https://github.com/sindresorhus/stringify-attributes) - Turn an object into a string of HTML attributes ## License MIT © [Sindre Sorhus](https://sindresorhus.com)