Skip to content

Instantly share code, notes, and snippets.

@lricoy
Last active February 5, 2018 23:41
Show Gist options
  • Save lricoy/e156807c575b586f94e24061e6d670e3 to your computer and use it in GitHub Desktop.
Save lricoy/e156807c575b586f94e24061e6d670e3 to your computer and use it in GitHub Desktop.
Simple Plain JS/HTML create element
<!DOCTYPE html>
<html>
<body>
<div id="myApp"></div>
<script type="text/javascript">
const rootElement = document.getElementById('myApp')
const message = document.createElement('span')
message.className = 'stylish-message'
message.innerText = 'Simple HTML'
rootElement.appendChild(message)
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment