Earlier quoted context omitted.
The HTML document is in the "comment" field of the JPEG, which is perfectly reasonable. What is surprising is that web browsers just ignore the 24 bytes of binary data between the start of the file and the start of the HTML.
That extra binary data starts with an HTML comment tag ( Edit: Misread your comment...the bytes at the beginning of the file are hidden by CSS (as pointed out by others).
The browser actually picks that "text" up and shows it on page. It's just the html content itself contains some css rule to make that text not visible.