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
Try Out Code2care Dev Tools:


Android Java Linux Microsoft Google Python macOS Notepad++ Microsoft Teams CSS PHP SharePoint Html Linux C Programs Bootstrap jQuery Sublime Android Studio Facebook Eclipse WhatsApp News MySQL Json HowTos JavaScript FTP S3


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, Tutorials, Trouble-Shooting steps, Video Tutorials, Code Snippets, How Tos, Blogs, Articles, etc.
🎉 We are celebrating the 10th years of Code2care! Thank you for all your support! We hope we made a difference.
We strong support Gender Equality & Diversity.

We stand in solidarity with Ukraine - Make a donation to UNHCR -