3 min read · Free · No login needed
You write HTML in a text editor. Any plain text editor works, but some editors make learning much easier because they colour the tags, complete your code, and show mistakes early.
Notepad comes free with Windows. Open it, type your HTML, then save the file with Save As and choose the file type All Files. Name it index.html. Then double-click the file — it opens in your browser. Notepad is simple, but it has no colour coding and no hints, so it is slow for real work.
Visual Studio Code is free, from Microsoft, and it is the editor most developers use. It colours your tags, closes them automatically, and shows errors as you type. Install it from code.visualstudio.com, open a folder, create a file called index.html, and start typing. VS Code even suggests tag names as you type them.
Whichever editor you choose, remember two things: save the file with the .html extension, and refresh the browser after every change to see the result.
! and press Tab — it writes a full basic HTML page for you in one second.A code editor is just a text editor that understands code. It colours the tags, highlights mistakes, and helps you close tags you forgot. It does not run the code — the browser does that. The editor only helps you write it correctly and quickly.
When you save, the file name matters. Use small letters, no spaces, and end with .html. For example, mypage.html is good. My Page.html is bad — spaces in file names cause problems when you upload the page to a server later.
mypage.html (good) my-first-page.html (good) My Page.html (bad — has a space) page1.txt (bad — wrong ending)
.html, not .txt.<!DOCTYPE html> — the first line. It tells the browser this is an HTML5 document, so the page is read the modern way.<html> ... </html> — the root element that holds the whole page.<head> and <title>My Page</title> — the title shows on the browser tab. The head itself never appears on the page.<body> ... </body> — the visible part of the page.<h1>Welcome</h1> — the main heading, the first thing the visitor reads.<p>I wrote this page in my editor.</p> — a paragraph of text. Save this file as mypage.html and double-click it to see it in your browser.<!DOCTYPE html>
<html>
<head>
<title>My Page</title>
</head>
<body>
<h1>Welcome</h1>
<p>I wrote this page in my editor.</p>
</body>
</html>
Change the code below and press Run to see the result instantly. No file to save, no login needed.
The questions learners ask most about this lesson — read the question, then open it to see the answer.
Visual Studio Code is recommended. It is free, colours your tags, closes them automatically, and shows errors as you type.
Yes. Notepad comes free with Windows. Save with Save As, choose All Files, and name the file index.html.
No. Word and WordPad add invisible formatting that breaks your code. Use a plain text editor or a code editor only.
Finished the lesson? Test yourself with 5 quick questions — you get the answer instantly, with the reason for each one.
1. Which editor is recommended in this lesson?
2. What should you NEVER write HTML in?
3. In VS Code, what does typing ! and pressing Tab do?
4. What is a good file name for an HTML page?
5. What does a code editor NOT do?
Read the question first, try to answer it in your own words, then open it to check. These are the questions interviewers actually ask.
Visual Studio Code. It is free, colours the tags, closes them automatically, shows errors as I type, and suggests tag names. For a beginner, Notepad also works, but VS Code makes learning much faster.
Word adds invisible formatting to the text — fonts, styles, special characters — which breaks the code. HTML must be written in a plain text editor or a code editor, never in a word processor.
Type ! and press Tab — VS Code writes a full basic HTML page (DOCTYPE, html, head, title, body) in one second.
Reading is not enough — now build it yourself. Write the code in the live editor, run it, check the hint if you get stuck, and open the solution only after you have tried.
Create a page, save it as mypage.html (small letters, no spaces, ending with .html), and open it in your browser. The page must show a heading and a paragraph.
<!DOCTYPE html> <html> <head> <title>My Page</title> </head> <body> <h1>Hello, I am learning HTML</h1> <p>This page is saved as mypage.html and opens in my browser.</p> </body> </html>
AI can write code for you, but it cannot think for you. When you learn HTML yourself, your brain builds the real skill: you understand why a page looks the way it does, you can fix it when it breaks, and you can answer it in an exam or an interview without help. That is the skill that gets you a job — not a copied answer.
Finish all 35 lessons, pass the test (80%), pay ₹10 and get your certificate.
Take the testPrefer watching? Video courses teach the same topics step by step.
Free tutorials teach you the basics. Our paid courses add live projects, mentorship and a certificate.
Browse all coursesAsk about courses, website & more
Request human callback:
Please log in to download. You will stay on this page after logging in!
New here? Register now →