Can I run a website on localhost?
Website and Web Application Testing
However, while you'll eventually deploy your website on a web server, you don't want your unfinished website online and usable just yet. Instead, you can host your website files on your personal computer and make these files available via localhost.
How to create local host for HTML?
html' file inside our root web directory of our localhost server '/Applications/MAMP/htdocs/' and load up http://localhost:8888 in your browser. If you are using XAMPP, your htdocs folder will be located in the XAMPP directory. You would then use the http://localhost URL. You should now see 'home.