# why tex4ht adds an extra newline when using \begin{description} after \item?

Tex4ht does not seem to behave well when using \begin{description}. It produces output where it adds new line after each item[x] entry. While in PDF it works correctly.

Here is below a MWE and screen shot of the HTML output and the PDF output. This makes using \begin{description} not possible in tex4ht since the HTML generated looks very bad.

\documentclass[11pt]{article}% MWE shows problem with tex4ht

\begin{document}

Example 1

\begin{description}
\item[1]  A
\item[2]  B
\item[3]  C
\item[4]  D
\item[5]  E
\end{description}

Example 2

\begin{description}
\item[]  A
\item[]  B
\item[]  C
\item[]  D
\item[]  E
\end{description}

Example 3

\begin{enumerate}
\item A
\item B
\item C
\item D
\item E
\end{enumerate}
\end{document}


Compiled with make4ht bug.tex. Here is side-by-side, the HTML and the PDF

Notice that when using \item[] it works OK, but when putting some value inside the item, it adds new line, when it should remain on the same line like with the PDF output. i.e. \item[1] does not work the same way as \item[]. This is example 1 above. example 2 and 3 are OK.

I am using latest update on texlive 2016

which tex4ht
/usr/local/texlive/2016/bin/x86_64-linux/tex4ht


Is this a known issue in tex4ht? Is there a workaround?

It is not easy to style HTML description list to look in the same way as LaTeX description list. Here is my attempt:

\Preamble{xhtml}

\Css{dl:after {content:"";display:table;clear:both;}}
\Css{dt{float:left;min-width:3em;clear:left;}}
\Css{dd{float:left;}}
\begin{document}

\EndPreamble


The dt and dd elements hold the description label and text. We use some simple CSS to put them on the same line. Note that it doesn't work in every instance:

So multi-line descriptions still end on new lines. I don't know how to fix that.