Put your text file under source/downloads/code
You can then use the markup syntax to display these links:
[link name](url for the txt file)
The URL will be {your blog url}/downloads/code/{name of txt file}
This comes from the include_code plugin, which also shows a download link for each list of codes.
UPDATE: To do this from HTML, you can use
<a href ="{your blog url}/downloads/code/{name of txt file}">Text File</a>
source share