HTML is a markup language, it's even in the name... but it's not a complete programming language by any stretch.
For that matter, it wouldn't take much to get HTML to have those features... though the DOM, JS and even WASM do so well, we don't need it generally speaking.