Download Article
Follow this simple guide for Windows & Mac to save your txt files as html
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
- Open the code file in a plain text editor like Notepad or TextEdit.
- Add
<html></html>
tags around the code. - Save the document as an .html or .htm file.
- Open the file to make sure everything looks as intended.
Steps
-
Open your code file. 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 .
-
Insert an HTML tag at the top of your document. Click into the top of your document and add a
<html>
tag on a new line.Advertisement -
Insert a closing HTML tag at the top of your document. Click into the bottom of your document and add a
</html>
tag on a new line. -
Open the Save dialogue. To do this, click File > Save As .
-
Save as an html or htm file. 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 . -
Open your file to make sure it opens properly. 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] X Research source
Advertisement
-
Open your code file. 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 .
-
Insert an HTML tag at the top of your document. Click into the top of your document and add a
<html>
tag on a new line. -
Insert a closing HTML tag at the top of your document. Click into the bottom of your document and add a
</html>
tag on a new line. -
Open the Save dialogue. To do this, click File > Save As .
-
Save as an html or htm file. 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 . -
Open your file to make sure it opens properly. 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.
Advertisement
-
Go to the CloudConvert website. CloudConvert is a free website that allows you to convert files into other file types.
-
Choose TXT in the first dropdown. It's on the right-hand side of the webpage, next to the word "convert." The TXT option is under the "Document" section.
-
Choose HTML in the second dropdown. It's on the right next to the first dropdown, separated by the word "to." The HTML option is under the "Document" section.
-
Click the red Select File button. 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.
-
Choose the file you want to upload. If you want to convert multiple files at once, click Add more files at the bottom of the page.
-
Click Convert . It will take a few seconds for your file to be converted to HTML.
-
Click Download once your file is converted. Your .txt file has now been converted to .html and can be used in website applications.
Advertisement
Community Q&A
Search
-
QuestionHow do I add audio and video in HTML to my first website?Community AnswerThe 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.
-
QuestionCan I edit the HTML file after saving it?Community AnswerYes! Just go to the original text document, edit it, and then save it. All new changes will be seen on the website.
-
QuestionI followed the instructions correctly, but it doesn't seem to work. How can I fix this?Community AnswerEither 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.
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
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!
References
About This Article
Thanks to all authors for creating a page that has been read 292,446 times.
Advertisement