But they've never written a web page, never bothered to look behind web pages, and don't know the syntax. I'm sure they'd be great if they chose to learn the syntax, grammar and elements, but they've no need.
They certainly know about mathematical logic, and almost certainly know the concept of an inner-join, but they've never dealt with relational databases, and certainly not SQL.
I'm pretty sure you can't be a good web developer without being about to write at least a little straight HTML, and without knowing the differences in use and performance of the different types of join, but even then I'm not convinced.
Just speaking from my experience. It seems to me that sweeping generalisations such as "Can't write HTML => bad programmer" says more about the speaker than the subject.
The "discussion" got out-of-hand, and it's too late to try to write something balanced and conciliatory.
I will yield to your experience, and certainly do not suggest that it is impossible to be good without a grasp of the two technologies.
My instinct, however, is that not knowing HTML (which I define as understanding the structure and basics, not complete mastery of XHTML 2 tags or something of the kind) shows an alarming lack of curiosity especially given how dominant web-based technologies have been in the last 6-7 years or so.
Understanding databases and SQL (again, no mastery needed), on the other hand, seems like an exceptionally useful thing to have in your toolbox. How do you evaluate data storage options without having some working knowledge of databases?
They are also both relatively cross-cutting for the field of software development, not specialised niches.
Now, the guys and/or gals you know probably are great programmers: but I think a very small time investment in the two subjects would be quite beneficial.
Edited for grammar and added 2nd last paragraph.
Seriously, I think people might be showing a certain myopia in this thread, believing that the subfield that they're working on is all there is, or at least all that matters. If you want someone to write an iterative eigenvalue solver for a large sparse matrix in Fortran, I'm your guy... but my HTML is at the level of circa 1997 "Look at my awesome <blink>web page</blink>".
The only thing it shows is a lack of interest in HTML. A lot of people take a problem-first approach to career development and will only learn a new technology if it helps them solve a particular class of problems. For all you know a programmer not interested in HTML could be dabbling in graphics or compiler writing in his spare time - domains where HTML or web technologies are not really needed.