document.body.append( document.createElement("div") ); console.log( "Emty div is generated inside
:", document.body.innerHTML.includes("") ); document.body.append( Object.assign( document.createElement("p"), { textContent: "Element’s text content.", style: "color: coral;" } ) );