Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Generate HTML code in javascript simply.

branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 test
Octocat-spinner-32 index.js
Octocat-spinner-32 package.json


Generate HTML code in javascript simply with this module using browserify.

npm install huk-browserify
var $ = require('huk');

var button = $.button('Click!');
  .header({ 'class': 'foo' }, 'Header')
  .footer({ id: 'bar' })

create an element

simple element

// $.<HTMLTagName>(<Attributes>, <Content>);

// creating only with attributes
// attributes are just simple Object key-value pairs
$.b({ id: 'foo' });

// if the first argument isn't an Object it will be the content
// content can be a String/Number/DOM element

// first argument are the attributes
// second argument is the content
$.strong({ id: 'foo' }, 'bar');

multiple element

  • .appendTo(domElement), .prependTo(domElement): Use them at the and of the chain
  • .text(String): creating a text node
  • .customElement(elementName, attributes, content): creating a custom element
Something went wrong with that request. Please try again.