I think ttyd does this, time to experiment
@BestGirlGrace perfect, this is exactly the sort of thing that you need. You may however need a basic websocket client I'm not sure it provides that. For testing purposes wscat is to websockets what netcat is to raw sockets
@BestGirlGrace oh and if you do have to go the route of writing the website part yourself, it's not that complicated + you can use this script to really pull it together http://erikosterberg.com/terminaljs/
You would just need to connect out to the websocket, and then print it with the functions that termina.js provides for printing to your web terminal
Don't let the name fool you. All the pornography here is legal, and much of it is hand-written. No fascists, no bigots.