How do I dynamically assign a value inside an HTML element?

@russian-dima Thank you for your effort. Really appreciate it! Just to push my luck further. How about if we pass the whole code from the website to html something like this:

on the website

datatoPass = "<div class="g-ytsubscribe"data-channel="GoogleDevelopers" data-layout="default" data-count="default"></div>"

$w("#html1").postMessage("datatoPass");

Would that be easier to receive in the CSS code?