Google's answer to that is wwwBasic: an interpreter for the classic programming language in a single 100KB file, that can be included in a web page to turn it into a good old Basic runtime, complete with emulated graphics screen, but also mouse and touch support. No, really, hello, world looks like this:
<!DOCTYPE html> <meta charset="utf-8"> <title>Hello, world!</title> <script src="wwwbasic.js"></script> <script type="text/basic"> print "Hello World!" </script>
Official examples include more advanced embedding options (also look at the Basic Anywhere Machine!) but it's probably easier to just use an iframe, like this:
callstatement is required, and you have to use parentheses (but not when declaring subroutines).
See also: my wwwBasic cheat sheet.
It's not very convenient to edit your source code without syntax highlighting, and with the line numbers way off in error messages. That's where the Basic Anywhere Machine steps in to fill the gap: a browser-based IDE and virtual computer of sorts built on the TiddlyWiki platform, that lives in a single web page and can also export each program to a stand-alone file that includes the runtime.
The BAM project also provides extensive reference documentation for wwwBasic, including numerous extensions. Bonus points for how well it resembles the QBasic of yore, except with 21st-century aesthetics.