The Items

        \def\item{\@inmatherr\item 
          \@ifnextchar [\@item{\@noitemargtrue \@item[\@itemlabel]}} 
        \def\@item[#1]{\if@noparitem ... 
                       \else ...\global\@inlabeltrue \fi 
           \ht:everypar{\global\@minipagefalse\global\@newlistfalse 
              \if@inlabel 
                \global\@inlabelfalse 
                \kern -\parindent 
                \box\@labels 
                \penalty\z@ 
              \fi 
              \ht:everypar{}}% 
           .... 
           \sbox\@tempboxa{\makelabel{#1}}.... \ignorespaces} 

Note that in LaTeX the item starts at the start of the next paragrap, not where the comamnd itself is present. Moreover, LaTex merges lists in \@donoparitem when they are stacked directly on items.

 
(P 0)...... 
\begin{trivlist} 
\item[xxxA] 
        \begin{trivlist} 
        \item[xxxB] 
                \begin{trivlist} 
                \item[xxxC] (xxxAxxxBxxxC).................. 
                \item[xxx] (xxx).................. 
                \end{trivlist} 
        \item[xxx] (xxx).................. 
        \end{trivlist} 
        (P)......................... 
\item[xxx] 
\item[yyy](xxxyyy).................. 
\end{trivlist} 
......................... 
 
      ----------------------------------------- 
 
\begin{verbatim} 
               (P 0)...... 
           xxxAxxxBxxxC .................. 
           xxx .................. 
           xxx .................. 
               (P)......................... 
           xxx 
           yyy .................. 
            ......................... 
\end{verbatim} 

<..html latex lists..>
 \let\:item=\@item
 \def\@item[#1]{\ifx \EndPicture\:Undef
        <.prepend @item[...].>\fi
    \if@newlist  \:item[{#1}]\@newlisttrue
    \else        \:item[{#1}]\fi    \global\@inlabeltrue
    \ifx \EndPicture\:Undef
        <.append @item[...].>\leavevmode    \ignorespaces
    \fi  }
 -_-_-

We insert the \leavevmode to ensure that all \items at the beginnig of lists are true. Otherwise, the lack of them causes a lose of html-info during collapsing effects as is the case, e.g., in the following code.

    The ten characters 
    \begin{quote}\begin{verbatim} 
    #  $  %  &  ~  _  ^  \ {  } 
    \end{verbatim}\end{quote} 
    should no 

In addition, without the \leavevmode we can end up with an outcome ‘<CODE > <LI> \@</CODE>’ instead of ‘<LI><CODE > \@</CODE>’.

Within ‘|<prepend @item[...]|>’, \if@noitemarg indicates whether we have a non user supplied label. Within ‘|<append @item[...]|>’, \if@inlabel does the job before we encounter the first paragraph.

Note that X1111 Y2222 X1111 X2222 is the output of ‘\ht:everypar{X\ht:everypar{Y}} \par 1111 \par 2222 \par \ht:everypar{X\ht:everypar{Y}} \par {1111} \par {2222} ’. That is, the everypars might happen within groups. Hence, probably the reason for \if@inlabel

<..append @item[...]..>
 \ShowRefstepAnchor
 \ht:everypar{%
    \if@newlist <.start new list.>\fi
    \global\@minipagefalse\global\@newlistfalse
    \if@inlabel
      \global\@inlabelfalse
      <.before each item.>\box\@labels
      <.after each item.>%
      \penalty\z@
    \else  <.between list pars.>%
    \fi
    \ht:everypar{<.between list pars.>}}%
 -_-_-

<..before each item..>
 \global\let\empty:D:T:D=\empty \:DT \hfill\break
 -_-_-

The \hfill\break prevents collapsing of spaces. We want to put \:DT at the end so it will gobble only the item mark. However, we can’t because of the problem of collapsing spaces.

<..after each item..>
 \:DD \ShowPar
 -_-_-

<..between list pars..>
 \:ListParSkip
 -_-_-

<..html latex lists..>+
 \def\ListParSkip{\def\:ListParSkip}
 \ListParSkip{\HtmlPar}
 -_-_-