You can use "--xml" option to MySQL and then transform the resulting XML output into either HTML or some other form of XML with XSLT.
Otherwise, if you don't need to retrieve data containing whitespace from MySQL, you can parse "mysql -ss" output and generate HTML in Bash.
Like this:
mysql -ss your_mysql_option... |
while read col1 col2 col3; do
echo "
<TR>
<TD>$col1</TD>
<TD>$col2</TD>
<TD>$col3</TD>
</TR>
"
done