1. The Three Languages You'll Use
Every web page you visit is built with three technologies working together. Your password checker will use all three in a single file:
HTML (HyperText Markup Language)
HTML is the structure of your page. It defines what things are: headings, paragraphs, text input boxes, buttons, and areas where results will appear. Think of it as the skeleton of a building—it establishes what exists and where.
CSS (Cascading Style Sheets)
CSS is the appearance. It controls colors, fonts, spacing, and layout. If HTML is the skeleton, CSS is the paint, wallpaper, and furniture. Your password checker needs to look clear and readable, but it doesn't need to be a design masterpiece.
JavaScript (JS)
JavaScript is the behavior—the part that makes things happen. When a user types a password and your page evaluates it, that's JavaScript doing the work. This is where your scoring logic lives: counting characters, checking for patterns, and deciding whether a password is weak or strong.
All three languages go in one single .html file. You don't need to set up a server, install software, or configure anything. Just a text editor and a web browser.
2. What You Need Before Starting
A Text Editor
You need something that saves plain text files (not Microsoft Word). Any of the following work:
- VS Code (recommended)—free, has color-coded syntax, and autocomplete. Available on your lab VMs.
- Notepad++—simple and lightweight, Windows only.
- Nano or Vim—already installed on your lab VM if you're comfortable in the terminal.
A Web Browser
Chrome, Firefox, or Edge. You'll open your .html file directly in the browser to test it. No server setup needed for development.
Your Lab VM
For final submission, your file needs to be hosted on your lab VM so the grader can visit it via URL. You'll place your file in the web server's directory (typically /var/www/html/ on Apache).
3. Learning Resources
You don't need to master these languages—you need enough to build one page. Here are the best starting points:
For HTML Basics
For CSS Basics
For JavaScript Basics
For Password-Specific Concepts
4. Thinking Through the Problem
Before writing any code, think about what your program needs to do. A password checker is actually a simple concept:
- Accept a password from the user (input)
- Analyze the password against some criteria (processing)
- Display a score or rating (output)
That's it. The complexity comes from deciding what criteria to check and how to score them. For the Basic tier, you only need two things: how long is it, and what kinds of characters does it use?
5. Pseudocode: Planning Your Checker (Basic Tier)
Pseudocode is a way of writing your logic in plain English before translating it to a programming language. Here's how to think about the Basic tier password checker:
Set Up the Page Structure
Listen for the User's Action
Measure the Password Length
Check Character Diversity
In JavaScript, you can loop through each character and check if it falls within a range, or you can use a regular expression (regex). A regex like /[a-z]/ tests whether any lowercase letter exists in the string. Search "JavaScript regex test method" to see how this works.
Combine the Scores
Display the Result
The pseudocode above is a guide for your thinking, not copy-paste code. You need to decide the specific point values, thresholds, and how to translate this logic into actual JavaScript. The reference demos on this site show what the end result should look like—not how to build it.
6. JavaScript Concepts You'll Need
You don't need to learn all of JavaScript. For the Basic tier, here's what to look up:
- Variables—storing values like
let score = 0; - Strings and .length—getting the number of characters in text
- If/else statements—making decisions based on conditions
- Functions—wrapping reusable logic in a named block
- document.getElementById()—connecting your JavaScript to HTML elements
- Event listeners or oninput—running code when the user types
- Regular expressions (regex)—testing if a string contains certain characters (like
/[A-Z]/.test(password))
Open your browser's Developer Tools (F12 or right-click → Inspect → Console tab). You can type JavaScript directly in the Console to experiment. Try typing "hello".length and pressing Enter—you'll see 5. This is a great way to test ideas before putting them in your file.
7. How Your File Should Be Organized
Your entire password checker lives in one .html file. Here's the general layout (not code—just the structure):
The browser reads your file from top to bottom. If your JavaScript tries to find the input box before the browser has read that part of the HTML, it won't find it. Placing your script at the bottom ensures all HTML elements exist before your code runs. (There are other solutions, but bottom-placement is the simplest.)
8. Testing Your Work
As you build, test frequently:
- Save your .html file
- Open it in your browser (double-click the file, or drag it into a browser window)
- Type a password and see if anything happens
- Check for errors—press F12, click the Console tab, look for red error messages
- Fix one thing at a time—if it's broken, undo your last change and try again
If nothing happens when you type, open the Console (F12). JavaScript errors appear there in red with a line number. Google the exact error message—someone has had the same problem before.
Test Passwords to Try
Use these to verify your checker is working correctly:
- "a"—should score very low (short, one character type)
- "password"—should score low-medium (8 chars but only lowercase)
- "P@ssw0rd!"—should score higher (has all 4 character types)
- "correct horse battery staple"—should score well on length alone
9. Hosting on Your Lab VM
Once your checker works locally, you need to put it on your lab VM so the grader can access it:
- Connect to your lab VM (SSH or remote desktop)
- Transfer your .html file to the web server directory (usually
/var/www/html/) - Verify you can access it by visiting
http://your-vm-ip/yourfile.htmlin a browser - Take your screenshots showing the URL bar with the VM address
SCP from your local machine: scp yourfile.html user@vm-ip:/var/www/html/
Copy/paste the file contents via SSH: open nano on the VM, paste your code, save.
VS Code Remote: connect VS Code directly to your VM and edit files there.
10. Want a Higher Score? (Beyond Basic)
The Basic tier checks length and character diversity. If you want to reach Intermediate or Advanced, here's what to explore next—but only after you have the Basic version working:
- Intermediate: Add a list of common passwords (like "password123", "qwerty") and check if the user's input matches. Research "leet speak" substitutions (@=a, 3=e, etc.) and check for those too.
- Advanced: Calculate entropy (the mathematical measure of randomness). Detect patterns like repeated characters, keyboard walks (qwerty, asdfgh), and sequential numbers. Estimate how long it would take to crack.
Look at the Basic, Intermediate, and Advanced demos on this site to see what each tier produces. Your job is to figure out how to make something that behaves similarly.