Writing HTML in Notepad

HTML code on a blank sheet

Hamza TArkkol/Getty Images

HTML provides the structural foundation of web pages, and any web designer will need to have an understanding of this language. The software that you use to code that language is up to you, however. In fact. if you use Windows, you don’t need to buy or download an editor in order to write HTML. You have a perfectly functional editor built into your operating system — Notepad.

This software has is limitations, but it will absolutely allow you to code HTML. Since Notepad is already included with your operating system, you can't beat the price and you can get started writing HTML immediately!

There are only a few steps to creating a web page with Notepad:

Open Notepad: Notepad is nearly always found in your Accessories menu.

Start writing your HTML: Remember that you need to be more careful than in an HTML editor. You won’t have elements like tag completion or validation. You are really coding from scratch at this point, so any mistakes you make will not be ones that the software can catch for you.

Save your HTML to a file: Notepad normally saves files as .txt. But since you’re writing HTML, you need to save the file as .html. If you do not do this, all you will have is a text file that has some HTML code in it.

If you’re not careful in the third step, you’ll end up with a file named something like filename.html.txt.

Here’s how to avoid that:

  1. Click on File and then Save As.

  2. Navigate to the folder you want to save to.

  3. Change the Save As Type drop-down menu to All Files (*.*)

  4. Name your file. Be sure to include the .html extension e.g. homepage.html.

Remember HTML isn’t terribly hard to learn, and you don't actually need to buy any additional software or other items in order to put up a basic web page. There are, however, advantages to using a more advanced HTML editing software.

Using Notepad++

A simple upgrade to the free Notepad software is Notepad++. This software is a free download, so if you are trying to write HTML without purchasing expensive software, Notepad++ still has you covered.

While Notepad is a very basic software package, Notepad++ has additional features that make it a great choice for coding HTML.

First off, when you save a page with the .html file extension (thereby telling the software that you are, indeed, writing HTML), the software will add line numbers and color coding to what you are writing. This makes it much easier to write HTML since it replicates the features you will find in more expensive, web design-centric programs. This will make it easier to code new web pages. You can also open existing web pages in this program (and in Notepad) and edit them. Once again, the additional features of Notepad++ will make this easier on you.

Using Word for HTML Editing

While Word does not come automatically with Windows computers the way that Notepad does, it is still found on many computers and you may be tempted to try to use that software to code HTML. While it is, indeed, possible to write HTML with Microsoft Word, it is not advisable. With Word, you get none of the benefits of Notepad++, but you have to struggle with the software's desire to make everything into a text document. Can you make it work? Yes, but it will not be easy, and realistically, you are much better of using Notepad or Notepad++ for any HTML or CSS coding.

Writing CSS and Javascript

Like HTML, CSS, and Javascript files are really just text files. This means that you can also use Notepad or Notepad++ to write Cascading Style Sheets or Javascript. You would simply save the files using the .css or .js file extensions, depending on which kind of file you are creating.

Original article by Jennifer Krynin. Edited by Jeremy Girard.

Format
mla apa chicago
Your Citation
Kyrnin, Jennifer. "Writing HTML in Notepad." ThoughtCo, Jul. 31, 2021, thoughtco.com/writing-html-in-notepad-3469131. Kyrnin, Jennifer. (2021, July 31). Writing HTML in Notepad. Retrieved from https://www.thoughtco.com/writing-html-in-notepad-3469131 Kyrnin, Jennifer. "Writing HTML in Notepad." ThoughtCo. https://www.thoughtco.com/writing-html-in-notepad-3469131 (accessed March 19, 2024).