Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


  <h1>Number Guesser</h1>
  <input type="number">
  <button>Submit Guess</button>
  <p class="feedback"></p>  



                * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial;
  color: #2D2F2F;
  text-align: center;

main {
  width: 400px;
  border-radius: 5px;
  border: 2.5px solid #76EFFB;
  padding: 12px 24px;
  background: #F0FEFF;
  margin: 12px auto;
  height: 180px;

h1 {
  margin: 8px 0;
  color: #444;

input {
  padding: 4px 12px;
  border-radius: 5px;
  border: 2px solid #777;

button {
  border-radius: 5px;
  background: #1CC0D0;
  color: white;
  padding: 6px 12px;
  border: none;
  cursor: pointer;
  margin: 8px;

.feedback {
  margin-top: 12px;
  font-size: 18px;
  color: #777;


                var correctNumber = 7;
var submitBtn = $('button');
var feedbackText = $('.feedback');

// -----------------
// ⭐️💥STEPS 1-2: 💥⭐️
// 1: Write an event listener and a function skeleton.
// 2: When the function runs, log a message to the user letting them know they clicked the button.
// -----------------

// -----------------
// ⭐️💥STEP 3: 💥⭐️
// INSIDE YOUR FUNCTION: Create a variable for the input element. Get the value of that element, and log it to the console to show the value they typed in.
// -----------------

// -----------------
// ⭐️💥STEP 4: 💥⭐️
// Instead of notifying your user of the number they typed, write an if statement to compare the user's guess to the correct number.
// -----------------