Yeah, HTML can't do anything like that on its own, it's just a mark-up language. If you want to develop text-based games first, and have no prior programming experience, I'd suggest
Python. The syntax is simple and understandable. The one thing is that the recipient's computer needs Python installed on it to run the scripts (it comes pre-installed on most Linux distros), unless you use the py2exe module to make an executable.
C or C++ is another good bet, but the syntax I find harder for beginners to get into. This is what I'd choose for 2D or 3D development, or some Windows applications.