Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including void-elements with all npm packages installed. Try it out:

var voidElements = require("void-elements")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

void-elements v3.1.0

Array of "void elements" defined by the HTML specification.


Object of "void elements" defined by the HTML specification

Exports an Object of "void element" node names as defined by the HTML spec.

The list is programatically generated from the latest W3C HTML draft.

Build Status Developing Dependency Status NPM version


var voidElements = require('void-elements');

assert(!voidElements['span'], '<span> is not a void element');
assert(voidElements['img'], '<img> is a void element');



RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free