We can create a html file, in same way we create text file on our machine, just need to change the extension of file to ".html" extension.
Through Text editors we can create file and we will save file on our machine to test our program.
We have bunch of variety of text editors specific to operating system for ex- Windows(Notepad), Mac(TextEdit), linux(Sublime, Vim) etc.
Steps to create html file through TextEdit.
Press Command + Space to open terminal, type textedit and Press Enter.
Added your Code in file and click on format options from top menu bar and Select Make Plain Text file.
save file as "index.html" extension and Press save button, it will prompt another modal to confirm extension
Choose use ".html" option, after that it will save the file with "index.html".
In this Step, we just need to double click on file and file content will get display on our default browser.
Press Window Button < type notepad, will open notepad
add html code in it, Press ctrl + s, give a name to file with ".html" extension.
go to the location of the file, and press double click on it, to open on default browser.