how to write HTML texts into a HTML file - hogehoge666/syno_moments_slider GitHub Wiki

1. edit target HTML file

  • Create a div tag with an id set to "output."
  • On VSCode, type "#output," press tab, and VSCode will create a div tag for you.
<div id="output"></div>

2. edit JavaScript file

  • get the div element you just created by the id name and set any HTML texts to its innerHTML.
document.getElementById('output').innerHTML = '<h2>Hello World!</h2>';
⚠️ **GitHub.com Fallback** ⚠️