Created
January 22, 2024 19:58
-
-
Save JacobKnaack/9ee77570d55649a68143269ab3c6c433 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>My first or second website</title> | |
<style> | |
h1 { | |
background-color: blue; | |
color: white; | |
} | |
p { | |
background-color: red; | |
color: white; | |
} | |
body { | |
padding: 100px; | |
} | |
</style> | |
</head> | |
<body> | |
<header> | |
<h1> | |
My Website Header! | |
</h1> | |
</header> | |
<main> | |
<p> | |
My Website text | |
</p> | |
</main> | |
<script> | |
let count = 0; | |
let question = 'How are you?'; | |
let answer = prompt(question); // ask the user something, and return what they type. | |
let userLovesJS = confirm("Do you love JS??"); // ask the user something they can yes / no | |
if (userLovesJS) { | |
alert('Great, me too!'); | |
} else { | |
alert('Aww thats too bad :('); | |
} | |
document.write(answer); // outputs something the actual website; | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment