Do I have to use Sublime, or can I use visual studio? Maybe it says to use Sublime because it is a freeware software?
You can use any code editor you like, Codecademy is only suggesting Sublime Text because it's a common favorite :)
Sublime only has an unlimited free trial. It costs $70 to get a license.
There's a big difference between being free and giving you a free trial download.
As @zystvan says, it's just a suggestion. And a weird one at that since it's not free.
VS supports html and css right? Go for it.
There's also Visual Studio Code which is free (as in money at least, don't know how far it goes), open source and cross-platform which I believe is meant to compete with editors like Sublime Text. No clue if it's good, but I would recommend checking it out over Sublime Text at least.
I really like brackets. Free, live browser preview on chrome and I just enjoy looking at the interface.
You can use notepad++ It's free and it serves the job.
I've tried a few code editors and I'm using Brackets now.