This is the working model of HTML I teach when needed. Browser devtools are used to demonstrate.
HTML stands for hypertext markup language. You can ignore hypertext as an old buzzword for now. The big deal about HTML is that it (and URLs) are the original web. It's fair to call the networking layer the internet and the concept linking of HTML files at URLs together the web. The web is in some ways the "open source" user interface layer of the internet. HTML was designed specifically for this, which leads to a few things.
First, as something designed for sending information about UI over internet networks, it is a serialization. If you don't already know what that means, it means a transformation of data into a format suitable for sending over networks. HTML is literally a plain text serialization of a UI to be rendered in a specific state. If that's confusing, take a button. In HTML you write a button tag with a disabled attribute:
<button disabled />