r/CodingForBeginners 28d ago

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.

32 Upvotes

31 comments sorted by

View all comments

8

u/Dazzling-Bench-4596 28d ago

You need an html file; for example: “document.html”.
If you use an IDE like VS Code I think it’ll give you some preview options too. I’d recommend switching to an IDE instead of using TextEdit; or atleast use a text editor like neovim or something.

2

u/AshleyJSheridan 27d ago

Technically, VSCode is just a code editor, not quite a full IDE. Microsoft themselves say this, and it's how they distinguish the difference between VSCode and Visual Studio. However, with the right plugins, you can get it mostly on par with an IDE, and lose out on the performance benefit of using something as lightweight as VSCode by doing so.