2.1 HTML

<..tex4ht HTML..>
 \ifx \a:HTML\:UnDef
    \Configure{HTML}
      {\IgnorePar\HCode{<html \a:@HTML
        \:xhtml{<.xmlns.>\Hnewline}>\Hnewline}}
      {\ifvmode\IgnorePar\fi\HCode{</html>\Hnewline}}
 \fi
 \ifx \a:HEAD\:UnDef
    \Configure{HEAD}
       {\IgnorePar\NoFonts\HCode {<head>}}
       {\HCode{</head>}\EndNoFonts}
 \fi
 \ifx \a:BODY\:UnDef
    \:CheckOption{frames} \if:Option
       <.frames BODY.>
    \else
       \Log:Note{for content and toc
            in 2 frames, use the command line option ‘frames’}
       \Log:Note{for content, toc, and footnotes
            in 3 frames, use the command line option ‘frames-fn’}
       <.no frame BODY.>
 \fi\fi
 \ifx \a:TITLE\:UnDef
    \Configure{TITLE}{\Protect\IgnorePar
       \HCode{<title>}}{\HCode{</title>\Hnewline}}
 \fi
 \ifx \a:@HEAD\relax \let\a:@HEAD=\empty\fi
 \ifx \a:@HEAD\empty
    <.meta tags.>
    <.import css.>
    <.HEAD charset.>
 \fi
 \:CheckOption{mouseover} \if:Option
   <.onmouseover @HEAD.>
 \else
   \Log:Note{for pop ups on mouse over,
           use the command line option ‘mouseover’}
 \fi
-_-_-

<..css inline..>
 \openin15=\jobname .css
 \ifeof15   \:warning{Missing file: \jobname .css }%
 \else
 \bgroup
    \catcode‘\{=12  \catcode‘\}=12  \catcode‘\%=12  \catcode‘\#=12
    \HCode{\Hnewline<style type="text/css">\Hnewline <!-- \Hnewline}%
    \loop
       \read15 to \:temp
       \def\:tempa{\par}\ifx \:temp\:tempa \let\:temp\empty \fi
    \ifeof15\else
       \expandafter\tmp:toks\expandafter{\:temp}%
       \HCode{\the\tmp:toks \Hnewline}%
    \repeat
    \HCode{\Hnewline-->\Hnewline</style>\Hnewline}%
 \egroup
 \fi
 \closein15
-_-_-

Should we go for

<style type="text/css"><!--/*--><![CDATA[/*><!--*/  
        ...  
      /*]]>*/--></style>

http://www.hixie.ch/advocacy/xhtml

<..HEAD charset..>
 \:CheckOption{uni-html4} \if:Option
    \def\A:charset{charset=utf-8}
 \else
    \def\A:charset{charset=iso-8859-1}
 \fi
-_-_-

\a:charset can come from a private configuration file, and from a poackage option. It takes precedence over \A:charset.