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.
Quick Start — From Viewing to Editing
Press F12 (Windows) or ⌘+Option+I (Mac). Click the Elements tab. You’ll see the full HTML tree of 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.
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.
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.
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
The full HTML structure of the page, collapsible at every level. Click ▶ to expand a node and see its children.
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.
Shows the full path from <html> to your selected element (e.g. html > body > main > section > h1). Click any ancestor to select it.
Options: Edit as HTML (full source edit), Delete element, Duplicate element, Copy (copy the outer HTML). These are your most powerful controls.
- 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.
$0shortcut: the currently selected element in the Elements panel is available in the Console as$0. Type$0in the Console to reference it in JavaScript.
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.
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.
Elements with a ▶ triangle contain children that are hidden. Click ▶ to expand before trying to edit the text inside.
HTML Training Missions
<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.Quick Start — From Viewing to Styling
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.
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.
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.
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.
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
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.
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.
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.
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.
- Quick experiments: try
background: hotpink,font-size: 3rem, orborder: 5px solid redon any element inelement.style {}. - Reveal hidden elements: find an element with
display: nonein the Styles pane and change it todisplay: block. What was hidden? - Force state: use the :hov button to freeze
:hoverstyles. 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.
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.
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).
!important utilitiesBootstrap 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
<body> element. In element.style {} in the Styles pane, add background: #1a1a2e. What changes? Now add color: white.background-color, color, and border-radius to create a completely different-looking button.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?Quick Start — From Watching to Controlling
In DevTools, click the Console tab. Or open it directly: Ctrl+Shift+J (Windows) / ⌘+Option+J (Mac). The > prompt is where you type.
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.
Use document.querySelector() to find an element by CSS selector, then change it. Example: document.querySelector('h1').textContent = 'Mutant Training Active';
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.
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
>) — where you typeType 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.
Press ↑ to recall your previous command, ↓ to move forward. You never have to retype a long command — just recall and edit.
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.
- 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 andloop()to resume.
const cannot be reassignedIf 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.
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.
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
document.title and press Enter. What does it return? Now type document.title = 'Danger Room Active' and check the browser tab.document.querySelector('h1').textContent = 'Your Message' then document.querySelector('h1').style.color = 'gold'.pulseSpeed = 0.2. What changes?Quick Start — From Classes to Layout
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.
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.
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.
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.
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
container → container-fluid (full width) • col-6 → col-12 • d-flex (flexbox) • justify-content-center • align-items-center
bg-primary • bg-success • bg-danger • bg-dark • bg-warning • text-white • text-dark • text-muted
d-none (hides completely) • invisible (hidden but holds space) • d-block • d-sm-block (visible at small+) • opacity-50
p-3 (padding all sides) • m-4 (margin) • mt-2 (margin-top) • px-5 (padding left/right) • gap-3 (flex/grid gap)
btn-primary • btn-outline-success • btn-danger • btn-sm • btn-lg • rounded-pill • shadow
- 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-6columns stack at small widths. - Stack classes freely: Bootstrap is designed to be combined.
btn btn-danger btn-sm rounded-pill shadowall work together on one element.
!important utilities block overridesd-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.
.rowAdding col-6 to an element that is not inside a .row does very little. The Bootstrap grid only works inside the row/col hierarchy.
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
<div class="container"> on any TNT page and change it to container-fluid. Does the layout expand to fill the viewport?btn-primary → btn-danger). Then add btn-lg rounded-pill to the class string. What does it look like now?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?