Learn HTML with Text Editor
To begin your HTML journey, all you need is a basic text editor. It's a great way to understand the building blocks of the web.
๐ก
Why Use a Simple Editor?
- Helps focus on raw HTML without distractions
- No auto-complete or syntax shortcuts
- Great for building strong fundamentals
๐ง Step 1: Open Notepad (Windows)
- Windows 8 or later: Start menu โ Search "Notepad"
- Windows 7: Start โ Programs โ Accessories โ Notepad
๐ Step 1: Open TextEdit (Mac)
- Finder โ Applications โ TextEdit
- Go to Preferences โ Format and select Plain Text
- Then in Open and Save, enable โDisplay HTML files as codeโ
โ๏ธ Step 2: Write Some HTML
Type or paste the following code into your text editor:
<!DOCTYPE html>
<html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>
๐พ Step 3: Save the File
- Click File โ Save As
- Name the file:
index.html
or index.htm
- Set encoding to UTF-8
- Click Save
โ
Tip: You can use either .html
or .htm
โ both are valid.
๐ Step 4: View in Browser
- Locate the file you saved
- Double-click it or right-click โ Open with โ Choose a browser (Chrome, Edge, Firefox, etc.)
๐ What Youโll See
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>This is a Heading</h1>
<p>This is a paragraph.</p>
</body>
</html>