HTML (Hyper Text Markup Language) is a web language to render the actual contents of the web page. In start, it was also used to format the content, but later on, the formatting styling and and layout was solely reserved with CSS (Cascaded Style Sheet). So, now, the core pupose of HTML is to render the web contents.
It is based on TAGs. Every Tag has two part, opening and closing i.e. <h1> is opeing tag and </h1> is closing tag for heading.
We can visualize the HTML web page as the hierarchical tree of TAGs. The root of this tree , is <HTML> tag. All other tags are nested inside this tag. HTML is not a programming language like high level languages C++ and Java.