Just a curious question, how does a computer work out what file tyue a certain file is. E.G. How does a computer work out that this pages is a type of html? of each file, s there header information in the binary? Ram allocation? how does it know this?
If you are talking about an "extension", it is in the name of the file.
However, this information is used by the OS to launch a certain application, for example, Safari/Chrome/Firefox for files ending in .html.
The application then uses the header (first few bytes) of the file to see if can display it. It may also interpret it in a way that outputs junk data. For example, if you rename an image (.jpg) file with the extension .txt, the OS will try to open the default text editor (NotePad/TextEdit) to open it. The editor will try to interpret it as if it's a text file, and will not show you an image.
You also mentioned "this page". This page is transferred by HTTP from superuser.com to your browser. The HTTP header should mention that the data it is sending over is text/html. The browser will interpret it as HTML and render it. That said, browsers are very complex and forgiving. So, even if the header does not say what the type is, it will try to guess.