You are looking at the HTML representation of the XML format.
HTML is good for debugging, but is unsuitable for application use.
Specify the format parameter to change the output format.
To see the non HTML representation of the XML format, set format=xml.
See the complete documentation, or API help for more information.
<?xml version="1.0"?>
<api>
  <query>
    <random>
      <page id="1488" ns="0" title="TTK4105 Reguleringsteknikk" />
      <page id="1377" ns="0" title="FY3402 Subatomær fysikk" />
    </random>
  </query>
</api>