Student-friendly HTML, CSS, and JavaScript reference with examples
Saves data to the browser that persists even after closing the page.
// Save a name
localStorage.setItem('userName', 'Alice');
// Save a number (stored as string)
localStorage.setItem('score', '100');
Important: