The document you are now reading is an HTML document whose URL ends in .gif.
This is perfectly legal. It is unconventional, but does not violate any standards.
Note, however, that Internet Explorer and some other recent browsers are intentionally broken, and sometimes try to guess the document type rather than doing what they're told. For example, here is a plain text document that some browsers will incorrectly try to display as HTML.
Also, note that there's more going on here than meets the eye. If you copy these documents to your own web site and give them the same apparent filenames, you will discover that it doesn't work. That's because it's the web server (not the browser) that identifies the file type, so moving files to a different server can completely change things. This web server has been configured in an unconventional (but perfectly legal) manner, to think that files that end in .gif are HTML documents, etc.