TechNoviceTools — Danger Room Training

  HTML  •  CSS  •  JavaScript  •  Bootstrap

Xavier’s Danger Room Guidelines

Four training sessions. Zero real-world consequences.
Step-by-step instructions for hacking any web page with Developer Tools.

Watch the Clips First HTML CSS JavaScript Bootstrap

The Danger Room responds only to your commands. Developer Tools opens the door. Your changes exist only in your browser tab — refresh the page and everything resets. That safety is what makes this the perfect training environment. Experiment freely. Break things deliberately. Learn by doing.

Your Training Target

Open the X-Men Bios: Danger Room Roster in a separate tab. That page is your obstacle course — pure HTML and CSS, no frameworks, designed specifically for these four sessions.

Open the Obstacle Course

HTML — The Skeleton of the Page

Elements Panel

Quick Start — From Viewing to Editing

1
Open DevTools and go to the Elements panel

Press F12 (Windows) or +Option+I (Mac). Click the Elements tab. You’ll see the full HTML tree of the page.

2
Use the cursor picker to select any element on the page

Click the arrow icon in the top-left corner of DevTools. Then click anywhere on the page — the Elements tree jumps directly to that element. This is your X-ray vision.

3
Edit text in place

In the Elements tree, expand any element with a ▶. Double-click the text node (the plain words between the tags) to edit the text directly. The page updates instantly.

4
Edit attributes or full HTML

Double-click an attribute value (like a class or href) to change it in-place. For bigger changes: right-click the element in the tree → Edit as HTML — a text area opens with the full tag and all its children.

5
Undo and reset

Ctrl+Z undoes changes in the Elements panel, one step at a time. Refresh the page (F5) to reset everything back to the original — your Danger Room resets.

Key Interface Areas

Elements Tree — center of DevTools

The full HTML structure of the page, collapsible at every level. Click ▶ to expand a node and see its children.

Cursor Picker — top-left icon in DevTools toolbar

Click the arrow icon, then click any visible element on the page to jump directly to it in the tree. Use this every time instead of hunting through the tree manually.

Breadcrumb Bar — bottom of Elements panel

Shows the full path from <html> to your selected element (e.g. html > body > main > section > h1). Click any ancestor to select it.

Right-click Menu — on any element in the tree

Options: Edit as HTML (full source edit), Delete element, Duplicate element, Copy (copy the outer HTML). These are your most powerful controls.

Tips
  • Drag and drop: elements in the tree can be dragged to new positions inside the tree. Try moving a paragraph above a heading.
  • Delete & restore: right-click an element → Delete. It disappears. Refresh to bring it back — the Danger Room always resets.
  • Find in tree: Ctrl+F inside the Elements panel opens a search bar. Search by tag name, class name, ID, or text content.
  • $0 shortcut: the currently selected element in the Elements panel is available in the Console as $0. Type $0 in the Console to reference it in JavaScript.
Gotchas
Selecting the wrong element

Hover slowly in the tree — the page highlights the corresponding area in blue. When in doubt, use the cursor picker and click directly on the page element you want.

Text node vs. element node

The text inside a tag is a separate node. Double-clicking the tag (e.g. <h1>) edits the element itself. Double-clicking the plain text inside edits just the text. These do different things.

Collapsed children

Elements with a ▶ triangle contain children that are hidden. Click ▶ to expand before trying to edit the text inside.

HTML Training Missions

HTML Missions
🥉Bronze: Use the cursor picker to click the main heading of any page. In the breadcrumb bar, identify its HTML tag and its parent tag. What are they?
🥈Silver: Double-click the heading’s text node and change it to your own words. Take a screenshot — it resets on refresh and no one else sees it.
🥇Gold: Right-click the <body> tag → Edit as HTML. Add class="bg-dark text-white" to the opening tag. The page will probably look unchanged — investigate why. Open the Styles pane for the <body> and confirm bg-dark’s background-color is there. Then look at the Computed tab for a heading to see that color has been overridden by a more specific rule. Every visible section (#csHero, #csMain, footer) has its own background-color that covers the body completely, and child elements each carry explicit color rules that beat the inherited value. Now apply the same two classes directly to a <section> instead. It responds. That gap between the two results is the CSS inheritance and specificity lesson.

CSS — Mystique’s Makeover

Styles Pane

Quick Start — From Viewing to Styling

1
Select an element in the Elements panel

Use the cursor picker or click in the tree. The right half of DevTools shows the Styles pane — every CSS rule targeting that element, from most to least specific.

2
Click any property value to edit it

Click the value next to a property (e.g., click #fff next to color). Type your new value — the page updates as you type. Press Tab to move to the next property.

3
Toggle properties on and off

Hover to the left of any property — a checkbox appears. Uncheck it to disable the rule. Check it to re-enable. Use this to test what each rule is actually doing.

4
Add a new inline style

In the Styles pane, find the element.style {} block at the very top. Click inside it and type a property and value (e.g., background: hotpink). This adds an inline style that overrides everything else.

5
Use the Computed tab to see the final resolved value

When multiple rules conflict, the Computed tab (next to Styles) shows the final winning value for every property. Struck-through properties in Styles are overridden — Computed tells you what actually won.

Key Interface Areas

Styles Pane — right side of Elements panel

Lists all CSS rules that affect the selected element, ordered by specificity. The rule at the top wins. Struck-through properties are overridden by a rule above them.

Color Swatches — next to any color value

Click any small colored square next to a color value to open a full color picker. Drag the picker to change the color live on the page. Eyedropper tool samples colors directly from the page.

Computed Tab — next to the Styles tab

Shows the final resolved value for every CSS property on the selected element. Click any property to see which CSS rule is setting it and where it comes from.

:hov Button — in the Styles pane toolbar

Forces pseudo-class states on the selected element. Click :hov and check :hover to inspect hover styles without moving your mouse away. Useful for seeing button and link hover effects.

Tips
  • Quick experiments: try background: hotpink, font-size: 3rem, or border: 5px solid red on any element in element.style {}.
  • Reveal hidden elements: find an element with display: none in the Styles pane and change it to display: block. What was hidden?
  • Force state: use the :hov button to freeze :hover styles. Many links and buttons only show their styles on hover — this lets you inspect them.
  • Box model diagram: scroll to the bottom of the Styles pane for a visual margin/padding/border diagram. Hover each section to highlight it on the page.
Gotchas
Overridden rules (struck-through)

If your change doesn’t appear, a more specific rule is winning. Look for a rule higher in the Styles list. Use the Computed tab to find which rule is actually controlling the property.

Missing units

font-size: 32 does nothing. Units are required: font-size: 32px or font-size: 2rem. Colors must be valid: red, #ff0000, or rgb(255,0,0).

Bootstrap !important utilities

Bootstrap uses !important on utilities like d-none. You cannot override them with a normal property in the Styles pane — you must add !important to your own value, or remove the class entirely.

CSS Training Missions

CSS Missions
🥉Bronze: Select the <body> element. In element.style {} in the Styles pane, add background: #1a1a2e. What changes? Now add color: white.
🥈Silver: Find any button on the page. Select it and change its background-color, color, and border-radius to create a completely different-looking button.
🥇Gold: Use the cursor picker to select an element. Open the Computed tab and find its font-size. Click it to see which CSS rule is setting it. Now override that value in the Styles pane. Did it work? Why or why not?

JavaScript — Jean Grey’s Telekinesis

Console Tab

Quick Start — From Watching to Controlling

1
Open the Console tab

In DevTools, click the Console tab. Or open it directly: Ctrl+Shift+J (Windows) / +Option+J (Mac). The > prompt is where you type.

2
Read page information

Type any expression and press Enter to see its value. Try document.title to see the page title, or document.URL to see the full URL. The result appears in blue below your command.

3
Change page content

Use document.querySelector() to find an element by CSS selector, then change it. Example: document.querySelector('h1').textContent = 'Mutant Training Active';

4
Change page appearance from the console

The Console and Elements panel are connected. document.querySelector('h1').style.color = 'gold'; does the same thing as editing the Styles pane — but you can do it with a single command.

5
Override a function

If a page has a global function like draw() (from p5.js apps), you can replace it entirely: paste a new function definition like draw = function() { background(0); ellipse(200,200,100,100); } and press Enter. The page now runs your version instead.

Key Interface Areas

Console Prompt (>) — where you type

Type any JavaScript expression or statement. Press Enter to run. Press Shift+Enter to add a new line without running — use this for multi-line code.

Command History — arrow keys

Press to recall your previous command, to move forward. You never have to retype a long command — just recall and edit.

Output Colors — what the responses mean

Blue/grey = returned value; red = error; grey = your own console.log() output; undefined = the command ran but returned nothing (that’s fine for statements).

$0 and $_ — built-in console shortcuts

$0 = the element selected in the Elements panel. $_ = the result of the last expression. Example: $0.style.background = 'lime' styles whatever you have selected in the tree.

Tips
  • Select all matching elements: document.querySelectorAll('p') returns a NodeList of every <p>. Chain with .forEach(el => el.style.color = 'red') to change them all.
  • Console.log to debug: add console.log(variable) inside an overridden function to watch a value change each frame. It prints to the Console every time the function runs.
  • Add a class from the console: document.querySelector('nav').classList.add('bg-danger') adds a Bootstrap class without touching the Elements panel.
  • noLoop() / loop(): on p5.js pages, type noLoop() to freeze the animation and loop() to resume.
Gotchas
const cannot be reassigned

If a variable was declared with const, typing variableName = newValue throws a TypeError. Variables declared with let or as simple globals (no keyword) can be freely reassigned.

Commands lost on refresh

Everything you type in the Console disappears when you refresh. Copy any snippet you want to keep before closing the tab. For persistent changes, use DevTools Snippets (Sources tab → Snippets) or Local Overrides.

Module-scoped functions aren’t accessible

Some pages use ES modules (type="module"). Variables inside modules are not on window and cannot be accessed from the Console. Only global (non-module) code is accessible this way.

JavaScript Training Missions

JavaScript Missions
🥉Bronze: Open the Console. Type document.title and press Enter. What does it return? Now type document.title = 'Danger Room Active' and check the browser tab.
🥈Silver: Use two Console commands to change the first heading’s text and color: document.querySelector('h1').textContent = 'Your Message' then document.querySelector('h1').style.color = 'gold'.
🥇Gold (on a p5.js page like Austin’s tutorial): Paste a function override into the Console to add a pulsing sin wave effect. Then live-adjust the speed by typing pulseSpeed = 0.2. What changes?

Bootstrap — Xavier’s Mental Architecture

Elements + Styles

Quick Start — From Classes to Layout

1
Select any Bootstrap-classed element

Use the cursor picker and click any element on a TNT page. In the Elements tree, look at the class attribute — you’ll see names like container, btn btn-primary, col-md-6.

2
Edit the class attribute

In the Elements tree, double-click the class attribute value (the text after class=). It becomes editable. The entire space-separated string of class names is now yours to change.

3
Add a Bootstrap class

Position your cursor at the end of the class string, type a space, then type a Bootstrap class name (e.g., shadow-lg, rounded-pill, text-center). Press Enter — the layout updates instantly.

4
Remove or swap a Bootstrap class

Delete a class name from the string (e.g., remove btn-primary and type btn-success). Press Enter. The change is instant — swapping color classes, sizing classes, or layout classes all work this way.

5
Use the Device Toolbar to test responsive classes

Press Ctrl+Shift+M to open the Device Toolbar. Drag the viewport width to test breakpoints. A col-md-6 element becomes full-width below 768px — watch it happen live.

Class Quick Reference

Layout

containercontainer-fluid (full width) • col-6col-12d-flex (flexbox) • justify-content-centeralign-items-center

Color & Background

bg-primarybg-successbg-dangerbg-darkbg-warningtext-whitetext-darktext-muted

Visibility

d-none (hides completely) • invisible (hidden but holds space) • d-blockd-sm-block (visible at small+) • opacity-50

Spacing & Sizing

p-3 (padding all sides) • m-4 (margin) • mt-2 (margin-top) • px-5 (padding left/right) • gap-3 (flex/grid gap)

Buttons

btn-primarybtn-outline-successbtn-dangerbtn-smbtn-lgrounded-pillshadow

Tips
  • Every class has a rule: in the Styles pane, every Bootstrap class appears as a CSS rule (e.g., .btn-primary { ... }). Inspect it to see exactly what the class does.
  • From the Console: document.querySelector('.btn').classList.add('btn-lg') adds a class without touching the Elements panel. Combine both approaches.
  • Device toolbar: Bootstrap’s grid is responsive. Drag the viewport width in the device toolbar and watch col-md-6 columns stack at small widths.
  • Stack classes freely: Bootstrap is designed to be combined. btn btn-danger btn-sm rounded-pill shadow all work together on one element.
Gotchas
Bootstrap !important utilities block overrides

d-none, text-center, and other utility classes use !important. A normal CSS rule in the Styles pane cannot override them. You must remove the class, or add !important to your competing rule.

Grid columns must be inside a .row

Adding col-6 to an element that is not inside a .row does very little. The Bootstrap grid only works inside the row/col hierarchy.

Responsive classes need the right viewport

col-md-6 only applies at ≥768px. Below that it becomes full-width. If your class change seems to have no effect, check the device toolbar — you may be below the breakpoint.

Bootstrap Training Missions

Bootstrap Missions
🥉Bronze: Find a <div class="container"> on any TNT page and change it to container-fluid. Does the layout expand to fill the viewport?
🥈Silver: Find any button and swap its color class (e.g., btn-primarybtn-danger). Then add btn-lg rounded-pill to the class string. What does it look like now?
🥇Gold: Add d-none to a visible section of the page to hide it. Then open the Console and use classList.remove('d-none') to bring it back. Can you find a section that’s already d-none and unhide it?

Danger Room Tier 1 complete?

Your next mission: Field Mission: Local Overrides — where the changes are real, they persist across refresh, and they stay until you delete them.

Enter the Field