5.13 How to use tex4ht with pdf and latex in same document?

use this

 
\documentclass[titlepage]{article}% 
\usepackage{ifpdf} 
\usepackage{hyperref} 
 
\begin{document} 
 
\ifpdf 
        I am in pdf mode %  pdflatex code,will show up in pdf only 
\else 
      %  latex code, check if htlatex is loaded and use link only then 
      \ifdefined\HCode 
         \href{../../index.htm}{home} % show up in HTML only 
      \else 
       I am in latex mode %  shows up in dvi and .ps only but not in html 
      \fi 
\fi 
 
\end{document}