You are in an HTML class. Or you just want to learn HTML and maybe CSS. You want to write, test, and debug your code without the fuss (and possible expense) of running a web server locally or remotely. NetBeans your Mac allows you to do that.
The Web Server Problem
During the course of writing HTML, you will want to upload your HTML code to a web server and cnect to it with a web browser of choice. For example, Safari. But this presents some minor problems for the new student.
First, you can enable the Apache web server (httpd) your Mac. It's slightly hidden, but the real problem is that it opens port 80 your Mac to the outside world. If you are too cautious, you may not want to do it, especially if you do not have experience. If you really want to do this, here is an article that shows how to enable Apache in macOS. "How to cfigure Apache in macOS Sierra 10.12." I believe this article still applies to High Sierra. (The path to Apache is still /usr/sbin/httpd.)
A less difficult avenue is to install and run MacHTTP from Chuck Shott. It's a simpler Mac applicati with an obvious place to put your index.html file. Yet, the security aspect remains a problem. A secdary problem is that you will probably end up writing your HTML code in a text editor, and there will, in general, be no obvious way to determine where your coding errors are. Or get help from the user in the applicati with HTML commands. (But see this excellent web tutorial.)