Nodette saysCreate elements with createElement and insert them with append/prepend/before.
document.createElement("div") makes a detached element; set its content/attributes, then insert with parent.append(el), prepend, before, or after. For many inserts at once, build a DocumentFragment and append it once — far fewer reflows than inserting one at a time.
Power-ups you unlock
createElement makes a detached node
append/prepend/before/after insert it
Batch many inserts via a DocumentFragment
Set content/attributes before inserting
The Event Bubbler attacks — common mistakes
Inserting hundreds of nodes one by one (slow)
Forgetting to actually append the created element
innerHTML += in a loop (re-parses each time)
Boss battleCreate three list items in a fragment and append them in one operation.