Element.cloneNode

Element cloneNode(bool deepClone)

Clones the node. If deepClone is true, clone all inner tags too. If false, only do this tag (and its attributes), but it will have no contents.