In my opinion the fault here lies with the GL specification which incorrectly applies a physical orientation to an abstract coordinate space.
In reality TexImage2D accepts pixel data in “origin-first, S-major (S-increasing, T-increasing)” order. The first pixel passed, at the memory address given, is taken to be at (or near) the texture space origin. Each row of pixels form a line along the positive S axis, and subsequent rows are located at increasing T.
Physical orientation has no meaning in an abstract coordinate space such as texture space. Positive T direction is neither “up” nor “down” (or left-right, front-back, north-south, you get the idea).
If you take the description above, i.e. “origin-first” it immediately becomes clear that if you want to preserve the origin location, HTML elements with their origin in the top-left corner should be passed to TexImage2D top-left corner first.