\documentclass{article}

\input TeX4ht.sty
\Preamble{html}

\newcounter{c}
\NewSection\X
   {\addtocounter{c}{1}
      \HCode{<H2>}[\thec] }
   {\HCode{</H2>}}
   {\thec}
   {#1: #2\par}

\begin{document}  \EndPreamble

\tableofcontents[part,X]

\part{Psalms (131:1)}

\X{My heart} is not
haughty,  nor mine eyes lofty:

\X{neither do}  I exercise
myself in great matters,
or in  things too  high for me.

\end{document}

