@Ciastuus many html elements (p, div, span, … ) have an innerHtml attribute that will wrap text or raw html.

a web page is made up of hundreds of html elements…

the MagicMirror model is a single web page… and each module contributes a little bit of that content.

the getDom() routine is MagicMirrors request to the module to supply the html for ITS content. (paragraph, table, … whatever)…

BUT, until the getDom() routine returns, the stuff built is just in the modules memory space.

the content provided to MagicMirror is then inserted into the dom in the appropriate location based on the ‘position’ you provided in config.js.

the content can be built lots of different ways…

hard coded html text (just like a html file)
some hard coded and some built by building the little dom tree for the modules content
or all apis…

none of this is MagicMirror specific, as it uses the documented Document Object Model (dom) apis defined my the w3c standards.

your module’s content starts with a

< div> innerHtml is here < /div>

and then u set its div.innerHtml, or call div.appendChild(anotherElement)