Interactive HTML

When learning HTML, Codecademy gives you the practice you do directly after you read the paragraph on the left. When you complete the course, you can go back an edit the code and it will save. Codecademy even allows you to create new files and folders.

I created a new file and opened it. I added in code and pressed ctrl and enter to run the code. It didn’t come up on the screen. It still showed the code from the previous page I was on.
How do I view the code from a different page?

Hi there!

I’m not actually sure that’s possible… mainly because the Codecademy learning environment isn’t an IDE.

I have a fairly strong feeling that for each of the exercises, when you click Run (or use the CTRL+Enter keyboard shortcut to do so) that the environment looks for a specific file and evaluates that. I don’t think you can use it as a test bed for code which is unrelated to the exercise, which sounds like what you’re attempting to do.

If you want to play around with HTML, you can do so easily on your local computer using nothing more complicated than a text editor (like Notepad) and the browser you already have installed.

If you want to do something more complex, there are services like which are similar to the CC environment and allow you to test out code in an online sandbox.

1 Like

You need to open the page in the Codecademy browser. For example, this assignment only uses the http://localhost:8000/blueberries.html page* (as seen in the address bar), but there are extra pages in the files menu to the left.

If I wanted to go to deals.html I would change the URL to http://localhost:8000/deals.html and press enter.

Alternatively, for HTML/CSS all you need is an editor (Atom/VS Code/Notepad++ or even vanilla Notepad) and a web browser and you can write your new html files locally if they’re no use for the Codecademy tasks. Just have to refresh the page when you save.

*for most tasks, index.html is the main page that’ll load, and the URL will be https://localhost/. Same thing, just append the filename for the page you want to go to after localhost/