Manual:$wgWellFormedXml

Details
Whether to try to make our HTML output well-formed XML.

If set to false, output will be a few bytes shorter, and the HTML will arguably be more readable. If set to true, life will be much easier for the authors of screen-scraping bots, and the HTML will arguably be more readable.