Writing and saving your first HTML file

Writing and saving your first HTML file

When you create an HTML web page or HTML file for the first time. Then in the first step you have to create the HTML source file, then in step second save the HTML file with htm or html extension, finally in step 3 display this HTML file in any web browser. You have to follow all these 3 steps properly to create HTML.

Writing and saving your first HTML file

So let’s follow all the instructions to create a simple file/web page in HTML.

Step 1 – First of all write your HTML source code in Windows/Linux/Mac/Android text editor.

If you are using Microsoft Windows operating system. So you have the choice of visual code editor options available in the default Microsoft Windows Notepad (Windows 11 and later) text editor software, similarly TextEdit (Mac) text editor in Apple Mac operating system, or Vim text editor or Emacs, Gnome text editor in Linux operating system, or in addition visual readymade code editor software (like Microsoft Visual Studio Code, Sublime Text Editor, Brackets, Notepad++, Atom, etc.). Write HTML web page source code in any of the text editors mentioned here and save and edit it with .htm code.

<!DOCTYPE html>

<html lang=”en”>

<head>

<meta charset=”UTF-8″>

<meta name=”viewport” content=”width=device-width, initial-scale=1.0″>

<title>let explore html web page</title>

</head>

<body>

<h1>welcome to simple html web page </h1>

<h2>let tray to learn html </h2>

<p>let explore a simple html paragraph text</p>

</body>

</html>

Step 2. Manually save the created HTML file in a text editor.

Step in Microsoft Windows 11 Notepad text editor.

Click on File menu – Go to Save As option.

Here in the Save as type dropdown choice, select All Files option manually.

Now save your created file with .html/html file extension, for example, firstwebpage.html file.

Select this created html file storage location manually, where you want to store this html file manually.

Now click on Save option.

html file saving steps in apple mac TextEdit.

Open TextEdit text editor software in Apple Mac operating system.

Now select Make Plain Text option in Format menu, so that it is fixed that you are not using Rich Text Edit format.

Click on File menu > Save option.

Now save your HTML web page file with .html/html extension with new name, for example, firstwebpage.html.

Here in Apple Mac text editor make sure that the file format is fixed by default to Unicode (UTF-8).

Select this created html file storage location manually, where you want to store this html file manually.

Click on Save option manually and finally save the file.

How to save an HTML web page in visual code editor (VS Code, Sublime Text, etc.) software.

Create an empty new file in the above-mentioned ready-made text editor software.

Type and edit your desired HTML source code manually or paste the ready-made HTML source code into this file.

Go to File menu > Save As option.

Now save your created HTML file with .html extension. (for example, firstwebpage.html).

Select this created HTML file Save As storage location manually where you want to store this HTML file manually.

Step 3. Open your created HTML web page file.

To preview any of your created HTML file in a web browser.

Manually select the computer hard drive/ssd storage location where you stored your HTML file.

Manually double-click on the desired HTML file, and the file will automatically open in any of the default web browsers installed on your computer, such as Microsoft Edge, Google Chrome, Apple Safari, Linux Konqueror, Firefox, etc.

Now you can see your HTML file preview. If needed, you can manually edit the HTML source code in a text editor to change or modify the HTML web page layout, or view text, information as needed.