Using web storage you just store anything to the key, so if you stored something under the key ('highScore') , you can then use the functions provided to get whatever is stored in that key, the 'key' can be anything you choose as its name.
However, if you are looking to implement a 'high score' table that other people can view (so the scores are global if you like and everybody can see / try and beat them) , the web storage is not what you need as its limited to the person playing the game only.
Anyways... I dont know if I have explained very well, but here are 2 tutorials that might help you, the first one is about making a high scores table using web sotrage
https://www.scirra.com/tutorials/448/ar ... high-score
And this second one is to do what I mentioned earlier and make a high scores table available to anybody who plays from any device.
https://www.scirra.com/tutorials/346/on ... -php-mysql
In my tutorial Asteroid clone in less than 100 events's score system, I show you a way to sort your score within an array before saving it to webstorage all at once.
You can adapt the array sorting to only pick the score you are interested in and then save it as its own individual webstorage key.
Thanks guys. I should have given more information. I want the high score to be local and only show the top score achieved by the player, but replace it when the player beats it. Thanks for the links, I will check those out and see if they work for me!
EDIT: I followed the first tutorial and it works great! Thanks a lot!