\documentclass{book} \newenvironment{mylist} {\trivlist}{\endtrivlist} \input tex4ht.sty \Preamble{html} \ConfigureList{mylist} {\HCode{<div class="mylist">}} {\HCode{</div>}} {* }{} \Css{.mylist { color : red; }} % see cascade style sheets for % the meaning of \Css \begin{document} \HCode{<!--created by me-->} \EndPreamble \begin{mylist} \item First item \item Second item \end{mylist} \end{document}