How do I run HTML file in Notepad? (Windows)


In order to create and run an HTML file in Notepad on Windows, follow the below easy steps,

  1. Open Notepad (Press Windows Key + R and type notepad, then press enter)
  2. Now type your HTML code in the editor.
  3. Press: Ctrl + S to save the file, save the file as myhtmlFile.htm or myhtmlFile.html
  4. Also make sure that the "save as type" is set to All Files *.*. And Encoding is UTF-8
  5. Now locate the HTML file and double click on it.
  6. This should open your file on your default web browser (EDGE, Chrome or Firefox)
  7. You should be able to see your HTML page.
Saving and HTML file in Notepad
Saving and HTML file in Notepad