You can do this in plain Javascript. It's basically the same as in Unity.
Example:
Save the current level
window.localStorage.setItem('currentLevel', '5');
Read the current level
window.localStorage.getItem('currentLevel');
There are also a couple more methods:
window.localStorage.removeItem('currentLevel');
window.localStorage.clear(); Use this to delete everything in local storage
window.localStorage.key(index); Use this to get the name of the key(variable) name at a specific index, you can use this to loop through all the keys
I think this is great for saving game data, because it's fast, easy to use and all major browsers support it.
You shouldn't save any users' sensitive information using this, because any code on the website can access it. If you will be saving personal information of the users, you should encrypt it.
I don't think this would be a problem, but major browsers usually limit this storage space to 5MB, but since you will be saving plain text, it won't be a problem even for a game which has a lot of data to save.
If you have any other questions or want to help with something I'd be happy to do that :)