scrimba
Frontend Career Path
Essential JavaScript concepts
Cookie Consent
Buttons in forms - weird behaviour
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Buttons in forms - weird behaviour
AboutCommentsNotes
Buttons in forms - weird behaviour
Expand for more info
index.html
run
preview
console
<html>

<head>
<link rel="stylesheet" href="index.css">
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700;900&display=swap" rel="stylesheet">
</head>

<body>
<main>
<section class="section-container">
<h1>Learning to code? This is the most important thing you will ever read!</h1>

<ul>
<li class="li-green">💰 Land a job with a 6 figure salary</li>
<li class="li-yellow">💻 Master JavaScript in 3 hours</li>
<li class="li-blue">⚛️ Learn React in 10 minutes</li>
<li class="li-pink">☕ Be a NodeJS Dev by lunchtime</li>
</ul>

<h3>My subliminal learning technique worked for Mark Zuckerberg and Albert Einstein, and it can work for you!</h3>
<img src="images/bugatti.jpg">
<p>Want a great job in tech? Want a six-figure salary? Then you have come to the right place. I am going to tell you all
you need to know to get all of that and much more, without you lifting a finger. You can learn passively. Just sit back,
close your eyes, and let the sound of my voice make the code sink deep into your brain. </p>
</section>
</main>
<div class="modal" id="modal">
<div class="close-modal-btn-container">
<button class="modal-close-btn" id="modal-close-btn">X</button>
</div>
<div class="modal-inner" id="modal-inner">
<h2>We ❤️ Your Data!</h2>
<p class="modal-text" id="modal-text">We have a strict policy on tracking and spamming: we'll definitely track you, and we'll definitely spam you. To use this
site, enter your name and email address and accept our ridiculous terms and conditions.</p>
<form id="consent-form">
<input type="text" name="fullName" placeholder="Enter your full name" required/>
<input type="email" name="email" placeholder="Enter your email" required/>

<div class="modal-choice-btns" id="modal-choice-btns">
<button type="submit" class="modal-btn">Accept</button>
<button class="modal-btn">Decline</button>
</div>

</form>
</div>
</div>
<script src="index.js"></script>
</body>

</html>
Console
/index.html
-2:33