\documentclass[12pt]{article}

\newenvironment{applet}[1]{\special{html:<applet #1>}}{\special{html:</applet>}}
\newcommand\param[2]{\special{html:<param name="#1" value="#2">}}

\pagestyle{empty}

\begin{document}

\centerline{\Large\bf IDVI Embedded Applet Test}

\bigskip
\noindent
    This document was written in \LaTeX\ and processed for presentation as a web
    page by IDVI.  The applet below was included by using a natural extension of the
    \special{html:<a href=http://xxx.lanl.gov/hypertex/>}
        Hyper\TeX
    \special{html:</a>}
    specials.

\medskip
\centerline{
    \begin{applet}{code=ibook.v10b2.applets.text.TextApplet height=150}%
        \rule{\textwidth}{1pt}
        \param{text}{This text was passed to the applet as a parameter.}%
    \end{applet}
}

\medskip
\noindent
    The applet tags placed in the
    \special{html:<a href=testsource.html target=source>}
        original .tex file
    \special{html:</a>}
    enclose alternate text, much as applet tags in an html file do.
    This text would be visible if the resulting dvi file were viewed with xdvi.
    If the width and height tags for the applet had been omitted, then the applet would have been
    sized to exactly cover this enclosed, invisible, text.

\medskip
\noindent
    In the example above, the applet tags enclose a horizontal rule which is the width
    of the page and one pixel high.  If both width and height had been omitted, we would
    have had a very short applet.  Instead, the height was specified to be 150 pixels.
    The result is that, at every scale factor, the applet will be as wide as the rule which
    it encloses and 150 pixels high.

\end{document}