J...S
I have crossposted this question to stackexchange as well:
https://tex.stackexchange.com/questions/737060/how-to-keep-spacing-and-alignment-in-make4ht-output-html
-----
I was trying this snippet for exporting to html with make4ht:
```tex
\documentclass{article}
\usepackage{subcaption}
\usepackage{tikz}
\usetikzlibrary{automata}
\begin{document}
\begin{figure}
\begin{subfigure}{0.5\textwidth}
\centering
\begin{tikzpicture}
\node[state, initial] (a) {A};
\node[state, right of=a, xshift=5mm, accepting] (b) {B};
\draw[->] (a) -- (b);
\end{tikzpicture}
\caption{A image}
\end{subfigure}
\begin{subfigure}{0.5\textwidth}
\centering
\begin{tikzpicture}
\node[state, initial] (a) {A};
\node[state, right of=a, xshift=5mm, accepting] (b) {B};
\draw[->] (a) -- (b);
\end{tikzpicture}
\caption{B image}
\end{subfigure}
\caption{Overall caption}
\end{figure}
\end{document}
```
But the html output is a bit more 'crowded' than the pdf output.

The top part in the above image is html and the bottom part is from the pdf.
I had a look at the html, the `Figure 1: Overall caption` line is mis-aligned due to a `text-align: left` from a `div.caption`.
That won't be too difficult to fix with a build script, I suppose.
But the tikz images are too close together. I couldn't figure out why.
How can I make the html output resemble the pdf more closely? Primarily with regard to the horizontal space between the two subfigures.