Easily generate helpers for creating HTML tags. Works great as handlebars helpers or vanilla javascript utils.
Install
npm:
Install withnpm i html-tag-helpers --save-dev
Usage
Create a new instance of Tags
:
var Tags = ;var html = ;
Tags
Generate a function to create any HTML tag:
var apple = html; // pass text as the first parameter, and an object of// attributes as the second param.console
Default attributes
Pass default attributes as a second paramter:
var css = html;console;//=> <link href="styles.css" rel="stylesheet">
As Handlebars helpers
To create a handlebars helper:
Handlebars; var tmpl = Handlebars;console;//=> '<orange href="about/us.html">This is text</orange>'
Author
Jon Schlinkert
License
Copyright (c) 2014 Jon Schlinkert, contributors.
Released under the MIT license
This file was generated by verb-cli on August 21, 2014.