Query
Div
attr

<div div></div> work?

work!

<div div>xyz</div>
<output style="color:red"></output>
let fn={}; fn.q=(d=>document.querySelector(d))
fn.q('output').appendChild(fn.q('[div]').cloneNode(true))