JavaScript HTML DOM
<!DOCTYPE html> <html> <body> <div id="box"></div> <script> const box = document.getElementById("box"); // Plain text: the tags are shown literally, not parsed box.textContent = "Hello <b>world</b>"; // HTML: the <b> tag becomes real bold formatting box.innerHTML = "Hello <b>world</b>"; </script> </body> </html>