How to run an HTML file?

Many modern editors are available to create and modify web pages. But we recommend using simple editors like Notepad (windows) and Textedit (Mac).

How to open Notepad in windows?

Open start and type notepad at search.

(OR)

Open Start > Programs > Accessories > Notepad.

How to open Textedit in Mac?

press command + space enter Spotlight search will appear and type Textedit in that search.

(OR)

Open Finder > Applications > TextEdit

For mac, we recommend installing sublime text https://www.sublimetext.com/3

Let’s get started!

<html>
<header><title> This is title </title> 
</header>
<body>
Hello world
</body>
</html>

Copy the above code and past it the Notepad (or) Textedit.

Select File > Save as

Name the file as index.html. all HTML files should be in <filename>.html format.

Double click on the file, or right-click – and choose “Open with” and select your preferred browser.

the output may look like this.


Posted

in

,

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *