- HTML file is a text file, if we need to create an HTML file we can use any text editors.
- There are various types of text editors available which you can directly download,but for a beginnr, the best text editor is Notepad(windows),or TextEdit(Mac).
- If you have basic knowledge on text editors, then you can easily use other professional editors like Notepad++, Sublime Text, Brackets, Vim, etc.
- We belive in that using a simple text editor is a good way to learn HTML
Follow the steps below to create your first web page with Notepad or Notepad++.
Step-1: Open Notepad in PC
Windows 8 or later:
Click on Start Menu Button (the window symbol at the bottom left on the screen) and then type Notepad.
Windows 7 or earlier:
Click on Start Menu Button > All Programs > Accessories > Notepad.
Step-1.1: Open Notepad++ in PC
Windows 7,8, or later:
Click on Start Menu Button (the window symbol at the bottom left on the screen) and then type Notepad++.
Step-2: Write HTML Code in Notepad or Notepad++
Write or Copy the Below HTML Code into Notepad or Notepad++.
<html lang="en-us">
<head>
<title>Page title goes here..</title>
</head>
<body>
<h1>My First Heading</h1>
<p>My First Paragraph</p>
</body>
</html>
Step-3: Save the HTML Page in Local Disk
Save the file on your local computer or disk. To Save the file Click on File Menu Button > Goto Save or Save as File.
Name the file "File Name with .extension" example: ("index.html") and set the encoding to UTF-8.
Note: Some HTML elements have no content (like the <br>, <hr> element). These elements are called empty elements. Empty elements do not have an end tag.
Step-3: View the HTML Page in Your Browser
Open the saved HTML file in your favorite broswer.Double click on the file, or right-click and choose the open-with (your browser).
The outcome will look like this: