-1

I have a text file named info.txt and I want to generate a HTML page that shows its contents. How can I achieve it?

Text file:

Year : 2012
Name : Dragons
Size : 250mb

Expected HTML output:

Year of Realese : 2012
Name of the Show : Dragons
Size : 250
juzraai
  • 5,693
  • 8
  • 33
  • 47

1 Answers1

1

You have a key:value pair, you can save it as a json file use xmlhttpresponse to read json and create html elements. But xmlhttpresponse requires you to have a server running, it won't work locally. Read about json and how to access them using Javascript. It's very simple.

Ranga RS
  • 142
  • 9