Skip to content

Instantly share code, notes, and snippets.

@whynotavailable
Created August 28, 2019 22:35
Show Gist options
  • Save whynotavailable/ecb44b634f6d2e472d7a8c3073a80a06 to your computer and use it in GitHub Desktop.
Save whynotavailable/ecb44b634f6d2e472d7a8c3073a80a06 to your computer and use it in GitHub Desktop.
<!DOCTYPE html> <!-- doctype (just says it's HTML) -->
<html lang="en"> <!-- opening html root tag -->
<head> <!-- opening head tag, used for metadata -->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body> <!-- tag for stuff that shows up -->
<h1>Hello Dick Fucks!</h1> <!-- header 1 tag (biggest size) -->
<p> <!-- paragraph tag (for regular text) -->
Click <button id="btn" type="button">here</button>. <!-- button lol -->
</p>
<script> // script tag (this contains actual javascript code)
// get the element with the id of 'btn' and add an onClick function
document.getElementById("btn").onclick = function () {
// create a popup that says yolo
alert("yolo");
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment