An HTML parser converts HTML source text into a tree structure

      <body>
        <div id="myDiv" align="center">Some text</div>
        <svg xmlns="http://www.w3.org/2000/svg"
             xmlns:xlink="http://www.w3.org/1999/xlink"
             width="100" height="100">
          <rect fill="green" width="100" height="100" />
          <image xlink:href="http://web.mit.edu/img/BackImage.jpg"
                 width="100" height="100" />
        </svg>
      </body>
    
Diagram of a DOM tree for the <pre id='source'> as parsed by an HTML5 parser