⬅ Previous Next ➡

3. HTML Editors

HTML Editors
  • HTML Editors: Software used to write and edit HTML code. While you can use basic text editors, professional editors provide features like syntax highlighting and auto-completion.
  • Common HTML Editors:
    • Notepad: A basic, built-in text editor for Windows. It has no special coding features but is useful for learning the raw basics.
    • Notepad++: A free, lightweight editor for Windows that supports syntax highlighting (colors the code) and multiple tabs.
    • Sublime Text: A popular, sophisticated editor known for its speed and "Distraction Free Mode." It is cross-platform (Windows, Mac, Linux).
    • Visual Studio Code (VS Code): The most widely used editor by professionals today. It includes powerful extensions, a built-in terminal, and "IntelliSense" (smart code completion).
  • Creating, Saving, and Running HTML Files:
    • Step 1: Create – Open your chosen editor and write your HTML code (starting with <!DOCTYPE html>).
    • Step 2: Save – Use the Save As option. The filename must end with the .html or .htm extension (e.g., index.html).
    • Step 3: Run – Locate the saved file in your folder and double-click it. It will automatically open and display in your default Web Browser.
  • Important Tips:
    • File Naming: Always avoid using spaces in filenames (use my_page.html instead of my page.html).
    • UTF-8 Encoding: When saving in Notepad, ensure the encoding is set to UTF-8 to support all characters.
    • Live Server: In VS Code, you can use the "Live Server" extension to see changes instantly without refreshing the browser.
<!-- Steps to follow in any editor -->

File -> New File

Type: <h1>My First Heading</h1>

File -> Save As -> "index.html"

Open "index.html" in Chrome/Firefox
⬅ Previous Next ➡