To embed a text file in an HTML file, you can use the <embed> tag or the <iframe> tag, depending on your specific requirements.