Yes, but the idea seems to be to introduce them to programming concepts: variables, if/else, do/while, etc. The advantage of HTML and javascript is that it's very easy to see how a button click causes some logic to execute. It also shows them that programming can be done in a simple text editor using only tools you already have at your disposal, by virtue of having nothing but a computer.