HTML Tutorial
HTML5 APIs
Use modern browser APIs that work with HTML documents.
HTML5 introduced APIs for storage, canvas, drag and drop, media, geolocation, history, and more.
These APIs are usually used with JavaScript to build richer browser experiences.
code
localStorage.setItem("theme", "light");
const theme = localStorage.getItem("theme");