Skip to content

Instantly share code, notes, and snippets.

@GuyPaddock
Last active January 18, 2020 19:52
Show Gist options
  • Save GuyPaddock/cb665a6b7d1091374f622a2c5ed1539c to your computer and use it in GitHub Desktop.
Save GuyPaddock/cb665a6b7d1091374f622a2c5ed1539c to your computer and use it in GitHub Desktop.
Simple HTML + JS Examples
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>My Slightly More Advanced Page</title>
</head>
<body>
<h1>A Slightly More Advanced Simple Page</h1>
<p id="my_paragraph"></p>
<script>
document.getElementById("my_paragraph").innerHTML = "Hey, Wes!";
</script>
</body>
</html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>My Simple Page</title>
</head>
<body>
<script>
console.log("Hello, Wes!");
</script>
<h1>My Simple Page</h1>
<p>Open developer tools (F12 in Chrome) and take a peek at the "Console" tab.</p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment