Repository
Current version released
3 years ago
Versions
html-dom
Simple tools to create html dom
Usage
import { l } from './html-dom.js'
// create simple div element containt text string 'test'
l.div('test')
// create simple div with attribute class 'className'
l.div('with class Name',{class:'className'})
// create div with children
l.div(['first child text', l.div('second child'), l.div('third child'),{id:'third'}],{id:'main'})
Output
- Simple div with ‘test’ string
<div>test</div>
- Simple div with class ‘className’
<div class='className'>with class Name</div>
- Simple div with children
<div id='main'>
first child text
<div>second child</div>
<div id='third'>third child</div>
</div>