\documentclass[a4paper,11pt]{article}
\usepackage{verbatim, html}

\newenvironment{codeblock}[0]{\verbatim}{\endverbatim}
\begin{htmlonly}
\newenvironment{codeblock}%
[0]%
{ % start of environment
\begin{rawhtml}
<blockquote style="padding: 4px;
  border: 1px dashed darkblue;
  color: blue;
  background: #BFD6DB;">
\end{rawhtml}
\verbatim
}
{ % end of environment
\endverbatim
\begin{rawhtml}
</blockquote>
\end{rawhtml}
}
\end{htmlonly}

\begin{document}
\begin{codeblock}
int main(int argc, char *argv[]) {
  return 0;
}
\end{codeblock}
\end{document}
