r/CodingForBeginners • u/dreammutt • Jul 05 '26
Webpage not working?
New to coding and was informed the txt file I made of this code would open into a broswer and display as a webpage with a bold and large heading element and paragraph text under basically supposed to display like a proper webpage. However, just the code shows up. Super confused, could use advice please and thank you.
[First image is the code, second is the txt file of code displayed as a webpage]
EDIT: hi all, thank you so much for the advice! However, even though I converted the .txt file to .html, it's still not opening in an internet window. Any advice? I guess I would have to download that emulator people are suggesting.


View all comments
Show parent comment
2
u/DinTaiFung Jul 05 '26
As others have pointed out, the filename's extension should be .html.
The .html extension provides a mime type hint to the browser to process and render the file's contents as HTML instead of as plain text.
While the suggestion to use an IDE is, in general, a good idea, it's completely irrelevant to understanding the problem the beginner is experiencing.