I've suspected that Tim Berners-Lee knew TeX before he did HTML. That he was a physicist in computing at CERN means that he had to have seen TeX.
I'd say that the main difference is that TeX was looking backwards and HTML, forwards. Again, TeX was trying to computerize old, stable, slow, expensive, high quality manual typesetting for math, and HTML, at least now, is on the way to being the main way people view nearly all information and interact with computers. The emphasis on the 'typographic quality' of the results is very different: TeX goes for the highest quality, and HTML is to be quick and dirty.
Yes, both had smaller beginnings: For TeX, Knuth wanted to write his books. For HTML, Berners-Lee wanted a physics newsletter.
At this point there is a huge difference: TeX is solidly frozen, and HTML continues with changes as fast as Jeff Jaffe and the rest of computing can implement,
In the future, sure, HTML could replace TeX. For the very high quality paragraph setting, there's no fundamental reason HTML could not specify and implement that. For the math, similarly. There does need to be an 'executing language' (TeX is a programming language, maybe Turing machine equivalent, and not just static text), but JavaScript might suffice.
A big advantage would be that HTML now knows about all the characters in all the languages.
But such high interest in math is likely in conflict with reality!
I'd say that the main difference is that TeX was looking backwards and HTML, forwards. Again, TeX was trying to computerize old, stable, slow, expensive, high quality manual typesetting for math, and HTML, at least now, is on the way to being the main way people view nearly all information and interact with computers. The emphasis on the 'typographic quality' of the results is very different: TeX goes for the highest quality, and HTML is to be quick and dirty.
Yes, both had smaller beginnings: For TeX, Knuth wanted to write his books. For HTML, Berners-Lee wanted a physics newsletter.
At this point there is a huge difference: TeX is solidly frozen, and HTML continues with changes as fast as Jeff Jaffe and the rest of computing can implement,
In the future, sure, HTML could replace TeX. For the very high quality paragraph setting, there's no fundamental reason HTML could not specify and implement that. For the math, similarly. There does need to be an 'executing language' (TeX is a programming language, maybe Turing machine equivalent, and not just static text), but JavaScript might suffice.
A big advantage would be that HTML now knows about all the characters in all the languages.
But such high interest in math is likely in conflict with reality!