A simple solution with 3 steps in scripts: 1. Replace '<' to & l t ; 2. Replace '>' to & g t ; 3. Add <html><body></body></html> tags and <p> </p> for each line. More advanced replace need more steps.
An advanced solution: How to convert multiple text files to html files with self-defined format?