Tutorials
THE WORLD'S LARGEST WEB DEVELOPER SITE

HTML Editors

Write HTML Using Notepad or TextEdit

 

creation of web pages or its modification can be done by usage of professional HTML editors.

However, inorder to learn HTML we recommend you to use a simple text editor like Notepad (PC) or TextEdit (Mac).

We believe and trust that using a simple text editor to create web pages is a good way to learn HTML.

You can follow the four steps listed below for creating your first web page with Notepad or TextEdit.

Step 1: Open Notepad (PC)

 

Open Notepad in your computer - Windows 8 or later:

click on the Start Screen (the window symbol present at the left-bottom of your screen). Type Notepad.

Open Notepad in your computer - Windows 7 or earlier:

Clicking on Start (bottom left on your screen).Now, Click All Programs.Then, Click Accessories.Select by clicking Notepad.

Step 1: Open TextEdit in Mac

 

Open TextEdit

Please make sure that the text editor after opening is changed to plain text. Now Go to: Preferences > New Document > select plain text.

Also please ensure that both "Display html file as html code" and "Display RTF file as RTF code" options are kept checked under "Open and Save".

It is time to open a new document for placing the code.

Step 2: Write Some HTML

 

Write or copy some HTML code into Notepad that you have opened.

<!DOCTYPE html>
<html>
<body>

<h1>My First Heading</h1>

<p>My first paragraph.</p>

</body>
</html>

Step 3: Save the HTML Page

 

Do not forget to save the file on your computer. Select File > Save as in the Notepad menu present in the window.

you can save with name the file as"index.htm" and also set the encoding to UTF-8 (because it is the preferred encoding for all the HTML files).

for saving with the extension, you can be using either .htm or .html as file extension. There is no difference between the two, it is up to you to choose for using it.

Step 4:you can view the HTML Page in Your computer browser

 

This can be done by Opening the saved HTML file in your favorite browser (double clicking on the file, or right-click on the file - and choose "Open with").

The result will look similar as shown below: