PDF download Download Article
Follow this simple guide for Windows & Mac to save your txt files as html
PDF download Download Article

Did you know that if you type up some HTML in Notepad, you can save it in a way that it opens up in your browser, like a website? It won't be a fully fledged public site unless you turn it into one , but you can still see the effect of your HTML in your private browser. HTML is the markup language of the entire Web, being one of the core components along with CSS and JavaScript .

Quick Steps

  1. Open the code file in a plain text editor like Notepad or TextEdit.
  2. Add <html></html> tags around the code.
  3. Save the document as an .html or .htm file.
  4. Open the file to make sure everything looks as intended.
Method 1
Method 1 of 3:

Notepad (Windows)

PDF download Download Article
  1. If your file is saved as a .txt file, it will open by default in Notepad for Windows.
    • If your document isn't opening in Notepad, simply right-click the file, then click Open With > Notepad .
  2. Click into the top of your document and add a <html> tag on a new line.
    Advertisement
  3. Click into the bottom of your document and add a </html> tag on a new line.
  4. To do this, click File > Save As .
  5. When saving your code, you can enter any file name you like, but type .html or .htm after the file name. Ensure the file type dropdown is set to All Files or HTML .
  6. When you open the new version of your code, it will look like a website that applies the HTML you've written to the page. [1]
  7. Advertisement
Method 2
Method 2 of 3:

TextEdit (Mac)

PDF download Download Article
  1. If your file is saved as a .txt file, it will open by default in TextEdit on a Mac.
    • If your document isn't opening in TextEdit, simply control-click the file, then click Open With > TextEdit .
  2. Click into the top of your document and add a <html> tag on a new line.
  3. Click into the bottom of your document and add a </html> tag on a new line.
  4. To do this, click File > Save As .
  5. When saving your code, you can enter any file name you like, but type .html or .htm after the file name. Ensure the file type dropdown is set to All Files or HTML .
  6. When you open the new version of your code, it will look like a website that applies the HTML you've written to the page.
  7. Advertisement
Method 3
Method 3 of 3:

Online Converter (Windows & Mac)

PDF download Download Article
  1. CloudConvert is a free website that allows you to convert files into other file types.
  2. It's on the right-hand side of the webpage, next to the word "convert." The TXT option is under the "Document" section.
  3. It's on the right next to the first dropdown, separated by the word "to." The HTML option is under the "Document" section.
  4. If you click the Select File button itself, the webpage will open a dialog box where you can choose a file from your computer. If you click the arrow next to Select File , you can choose a different way to upload your file.
  5. If you want to convert multiple files at once, click Add more files at the bottom of the page.
  6. It will take a few seconds for your file to be converted to HTML.
  7. Your .txt file has now been converted to .html and can be used in website applications.
  8. Advertisement

Community Q&A

Search
Add New Question
  • Question
    How do I add audio and video in HTML to my first website?
    Community Answer
    The HTML element is used to embed sound content in documents. It may contain one or more audio sources, represented using the SRC attribute or the element, the browser will choose the most suitable one. It can also be the destination for streamed media, using a MediaStream.
  • Question
    Can I edit the HTML file after saving it?
    Community Answer
    Yes! Just go to the original text document, edit it, and then save it. All new changes will be seen on the website.
  • Question
    I followed the instructions correctly, but it doesn't seem to work. How can I fix this?
    Community Answer
    Either repeat Step 5 while making sure to add ".html" at the end of the file's name and select "All Files (*.*)" or verify that your code is correct without any errors.
See more answers
Ask a Question
      Advertisement

      Video

      Tips

      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Name
      Please provide your name and last initial
      Thanks for submitting a tip for review!

      About This Article

      Thanks to all authors for creating a page that has been read 292,307 times.

      Is this article up to date?

      Advertisement