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

Recent Posts:

Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and Software Developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include Learnings, Video Tutorials, Code Snippets, How Tos, Blogs, Articles, etc.