Using safe DOM element creation