DOM manipulation methods when to use html elements and when not to

DOM manipulation methods when to use html elements and when not to

In replicating the manipulation methods exercises, I noticed that sometimes html tags are used and sometimes they are not when adding a string.  What is the best practice?
Thank you in advance!
Ingrid