Html id div tag rendering

You can use an HTML-component to realize your wished idea.

  1. Add an HTML-Component onto your page.
  2. Resize it like you want it to have on your site-page.
  3. Send your wished data to the HTML-Component with…
    https://www.wix.com/velo/reference/$w/htmlcomponent/postmessage
  4. And receive the data in the html-component to work with it…

Something like this…
Page-Code:

let divID = "myPlace"
$w("#myHtmlComponent").postMessage(divID);

HTML-Component-Code:

<!doctype html>
<html>
<head>

<script type="text/javascript">
  function init () {
    window.onmessage = (event) => {
    if (event.data) {
      myPlace = event.data
      console.log(myPlace)
      document.getElementById(myPlace).innerHTML = "Temperatue is ....";
    }
    else{}
  }
}
</script>

</head>
<body onload="init();" style="background-color:lightgray;">
<div id=myPlace></div>
<h1>HTML Component Test</h1>
<p id="demo">Message will go here</p>
</body>
</html>