Using Notepad for Coding: A Beginner's Guide

Notepad is a simple text editor pre-installed in Windows operating systems. While its main purpose is to create, open, edit, and save text files, it can also be used as a code editor for basic coding tasks. Some programmers use Notepad because it opens quickly, is free, and requires no installation. However, there are disadvantages as well. Notepad does not provide features such as syntax highlighting, autocompletion, or code formatting. Notepad can be used to create HTML, Java, JavaScript, and Python files.
How to create HTML code in Notepad?
To create HTML code in Notepad, follow these steps:
- Step 1: Open your Notepad file
- Step 2: Write your HTML code in Notepad.
- Step 3: Click on “File” in the menu bar and select “Save As”
- Step 4: Choose the location where you want to save the file.
- Step 5: In the File name field, enter a name for your file and add the .html extension, for example, sample.html
- Step 6: In the “Save as type” box, select “All Files (*.*)” and click “Save”.
Here is an example of a simple HTML document in Notepad created for a website:

How to run HTML codes?
To run HTML codes, navigate to the location where you saved your HTML file. Right-click on the HTML file, select "Open with," and choose your preferred web browser (such as Google Chrome, Apple Safari, Microsoft Edge, Mozilla Firefox, Opera, etc.).

How to create a Java program using Notepad?
To create a Java program in CMD using Notepad follow these steps:
- Step 1: Open Notepad.
- Step 2: Write your Java code.
- Step 3: Save the file with a .java extension. For example, save it as "MyDay.java"
For example, you can write a simple text print code:

How to run a Java program in CMD using Notepad?
To run a Java program using Notepad follow these steps:
- Step 1: In Windows, create a folder, click on the address bar, and press Enter.
- Step 2: In the opened CMD, type “javac <filename>.java” (e.g., javac MyDay.java) and press Enter. This will compile the Java file and create a file with a .class extension.
- Step 3: In CMD, type "java MyDay" to display the output.
Note: If you get an error like 'javac' is not recognized as an internal or external command, it means that Java is not installed or the javac and java commands are not in your system's PATH. You can download and install the Java Development Kit (JDK) from Oracle's website and ensure that the PATH environment variable is set up correctly.

Can I write JavaScript in Notepad?
Yes, you can write JavaScript in Notepad. Here's how you can do it:
- Step 1: Open Notepad
- Step 2: Type your JavaScript code in the Notepad.
- Step 3: Add the link to your .js file inside the <head> tag of your .html file.
- Step 4: Right-click on your .html file and open it in a browser.
For example:



How to create Python code in Notepad?
To create Python program in CMD using Notepad follow these steps:
- Step 1: Open Notepad.
- Step 2: Write your Python code.
- Step 3: Save the file with a .py extension. For example, save it as "blue.py"
For example, you can write a simple code to calculate sum of all numbers from 1 to 100:

How to run Python code in Notepad?
To run Python code in Notepad, follow these steps:
- Step 1: In Windows, create a folder, click on the address bar, and press Enter.
- Step 2: In the opened CMD, type the name of the Python script (e.g., blue.py) and press Enter. This will execute the script and generate a file with a .class file extension.
Note: If you encounter an error stating that '.py' is not recognized as an internal or external command, it indicates that Python is either not installed or the Python directory is not included in your system's PATH environment variable.

Is there any online Notepad for programming?
Yes, among many options, one of the best is the online Notepad on texttiger.net.
Features of online Notepad on texttiger.net:
- Ease of Use:
- Texttiger.net provides a simple and user-friendly interface, making it easy to write and edit code.
- Collaboration:
- You can easily share your code with others and collaborate in real-time, making it a great tool for pair programming or group projects.
- Accessibility:
- Being an online tool, Texttiger.net can be accessed from any device with an internet connection, eliminating the need to install software locally.
- Multi-language Support:
- It supports a wide range of programming languages, so you can use it for various projects, whether you are working on web development, scripting, or other types of programming.
- Autosave:
- Your work is automatically saved, reducing the risk of losing your progress due to accidental closures or internet issues.
Frequently Asken Questions:
Is Notepad an IDE?
No, Windows Notepad is a text editor, not an Integrated Development Environment (IDE).
Can we directly compile codes from Notepad?
No, you cannot directly compile code from Notepad. Notepad is a text editor, not a compiler or an Integrated Development Environment (IDE).
can you edit XML files in Notepad?
Yes, you can edit XML files in Notepad. However, there are code editors available that offer advanced features for editing XML files, such as Visual Studio Code, Notepad++, and XML Notepad.