Text document not changing to html

I want to change the text in a text file called data.txt but I don't know how to change it with script. This is my code:

I've got it to work so that the text, that I've written in the document from the begging, pops up on the screen, but I don't know how to access it and change it with the script. Is there some command like this:

$change("#data.txt").text = "HelloWorld";

that can be used to change it or are you forced to use some other program for it to work?


Text document not changing to html


Microsoft MVP

Staff member

Microsoft MVP

  • #2

First make sure that the file name extension is showing:

Go to control panel, folder options, view tab. Make sure that he checkbox labelled "hide extensions for known file types" is not checked.

Then navigate to the file you want to change, highlight the name and change the extension from txt to html.

Don't know what you are trying to do but this change will not make it an html file of course.

  • #3

Assuming that what you are really asking is:
"How can I convert a text file to a html file?"
There is a freeware app named txt2html it is available through Sourceforge.

TXT to HTML Converter

Convert your txt files to html online & free

Drop files here. 100 MB maximum file size or Sign Up

Convert to TXT


Plaintext Text File

TXT is a file format that contains the text, organized in rows. Text files opposed binaries that contain data that is not intended for interpretation as a text (encoded sound or image). The text file can contain both formatted and unformatted text. Since the very simple text files, they are frequently used for storing data.

HTML Converter


HyperText Markup Language

HTML is a Web format file. HTML source code can be changed in a text editor. HTML files are being developed for future use in the users web browser, allowing you to format text, images and other materials required sites. File with this format use tags to build web pages. HTML code is parsed Web browser and usually not visible to the user.

How to convert TXT to HTML

Step 1

Upload txt-file(s)

Select files from Computer, Google Drive, Dropbox, URL or by dragging it on the page.

Step 2

Choose "to html"

Choose html or any other format you need as a result (more than 200 formats supported)

Step 3

Download your html

Let the file convert and you can download your html file right afterwards

TXT to HTML Quality Rating

4.5 (2,392 votes)

You need to convert and download at least 1 file to provide feedback!

i website layout image by 6922Designer from Fotolia.com

You can convert a text file to HTML without using special software. Such a conversion can be done with a pre-installed program on your PC or Mac. The conversion process is essentially like saving a file for the first time. All you'll have to do is add a file extension to it.

Right-click on the text file you want to save as HTML.

Select "Open With" and then "Notepad." If you're using a Mac, the program will be called TextEdit.

Click "File" and "Save As" in the program's navigation bar.

Choose the location you would like to save your new HTML file. Give your file a title in the text field "File name." Don't leave any spaces and remember to add ".html" (without quotes) at the end of the title. In the drop-down box labeled "Save as type" select "All Files." Select "Save."

Minimize Notepad's window. Locate the HTML file you just saved. Right-click on it, select "Open with" and choose the browser of your choice. The file will open as an HTML document.


Writer Bio

Scott Stanchak has been a professional journalist since June 2000, specializing in sports and technology. He has contributed to FoxNews.com, NBA.com, USABasketball.com, Time Warner, AT&T and Clear Channel, among other media outlets. Stanchak graduated with a bachelor's degree in communication arts from Ramapo College in New Jersey.

How do I change a TXT file to HTML?

How to convert TXT to HTML.
Upload txt-file(s) Select files from Computer, Google Drive, Dropbox, URL or by dragging it on the page..
Choose "to html" Choose html or any other format you need as a result (more than 200 formats supported).
Download your html..

How do I save a Notepad text file as HTML?

Select File > Save as in the Notepad menu. Name the file "index.htm" and set the encoding to UTF-8 (which is the preferred encoding for HTML files). Tip: You can use either .htm or .html as file extension. There is no difference; it is up to you.

How do I change the type of text file?

About This Article.
Open the file in its default program..
Click the File menu..
Click Save As..
Select a saving location..
Name the file..
Click the “Save as Type” menu..
Select a different extension..
Click Save As..

How do I change a text document to a file?

All you need to do is to right-click on the file, select the Open with and choose to open the file using Notepad. Once the text document is already opened, save it again as a text document.