// from https://snippet.zone
// hacky way to set many attributes - just for fun
const el = document.body.appendChild(
document.createElement('button'));
let i, a;
el.innerHTML = 'hello';
for (i in a = {
id: 'xyz',
title: 'hi there...',
style: `
background: red;
color:white;
font-size: 1.4em;
`
}) el.setAttribute(i, a[i]);
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.