To download file you can use php script as it is described here, but in Joomla! you must add this line of code:

 while( @ob_end_clean() );

Taken from here.

You should switch to html view and enter, for example:

<pre xml:html>
<!-- your HTML code here -->


Don't forget to turn on GeSHi plugin in the plugin manager!

Taken from here. 

If you have problem with links in your custom created module, like instead of it shows you then try to disable System - SEF plugin.