Chapter 18m

HTML Editors in Kannada

ಕನ್ನಡದಲ್ಲಿ HTML Editors ಕಲಿಯಿರಿ. Notepad, TextEdit ಮತ್ತು VS Code ಬಳಸಿ HTML File ರಚಿಸುವುದು, Save ಮಾಡುವುದು ಮತ್ತು Browser ನಲ್ಲಿ Open ಮಾಡುವುದನ್ನು ತಿಳಿಯಿರಿ.

ಹಿಂದಿನ Chapter ನಲ್ಲಿ HTML ಎಂದರೇನು ಮತ್ತು Basic HTML Document ನ Structure ಹೇಗಿರುತ್ತದೆ ಎಂಬುದನ್ನು ಕಲಿತಿದ್ದೀರಿ.

ಈಗ ನಿಮ್ಮದೇ HTML Code ಬರೆಯುವ ಸಮಯ!

HTML Web Page ರಚಿಸಲು Text Editor ಅಥವಾ Code Editor ಅಗತ್ಯವಿದೆ. Notepad, TextEdit ಅಥವಾ Visual Studio Code ಬಳಸಬಹುದು.

ಈ Chapter ನಲ್ಲಿ HTML File ರಚಿಸುವುದು, Save ಮಾಡುವುದು, Browser ನಲ್ಲಿ Open ಮಾಡುವುದು ಮತ್ತು Code ಬದಲಾಯಿಸಿ Updated Output ನೋಡುವುದನ್ನು ಕಲಿಯುತ್ತೀರಿ.

HTML Editor ಎಂದರೇನು?

HTML Editor ಎನ್ನುವುದು HTML Code ಬರೆಯಲು, ಬದಲಾಯಿಸಲು ಮತ್ತು Manage ಮಾಡಲು ಬಳಸುವ Application ಆಗಿದೆ.

HTML ಕಲಿಯಲು ದುಬಾರಿ Software ಅಗತ್ಯವಿಲ್ಲ.

Basic Text Editors:

  • Notepad (Windows)
  • TextEdit (macOS — Plain Text Mode)

Dedicated Code Editors:

  • Visual Studio Code (VS Code)
  • Sublime Text
  • Notepad++
FeatureBasic Text EditorCode Editor
HTML ಬರೆಯುವುದುYesYes
Syntax Highlightingಸಾಮಾನ್ಯವಾಗಿ ಸೀಮಿತYes
Auto-completionಸಾಮಾನ್ಯವಾಗಿ ಸೀಮಿತಲಭ್ಯ
File ManagementBasicAdvanced
Extensionsಸಾಮಾನ್ಯವಾಗಿ ಸೀಮಿತಅನೇಕ ಬಾರಿ ಲಭ್ಯ

W3PrimeCode Tip: Beginners ಯಾವುದೇ Editor ನಿಂದ ಪ್ರಾರಂಭಿಸಬಹುದು. HTML, CSS ಮತ್ತು JavaScript ಕಲಿಯಲು VS Code ಉಪಯುಕ್ತ ಆಯ್ಕೆಯಾಗಿದೆ.

Notepad ಬಳಸಿ HTML ಬರೆಯುವುದು (Windows)

Step 1: Notepad Open ಮಾಡಿ

Windows Start Menu ನಲ್ಲಿ Notepad Search ಮಾಡಿ Application Open ಮಾಡಿ.

Step 2: HTML Code ಬರೆಯಿರಿ

html
<!DOCTYPE html>
<html>
<head>
    <title>My First Web Page</title>
</head>
<body>
    <h1>Welcome to HTML</h1>
    <p>This is my first HTML page.</p>
</body>
</html>

Step 3: HTML File Save ಮಾಡಿ

  1. File → Save As ಆಯ್ಕೆಮಾಡಿ.
  2. File Name ನಲ್ಲಿ index.html ಬರೆಯಿರಿ.
  3. Save as type ನಲ್ಲಿ All Files ಆಯ್ಕೆಮಾಡಿ.
  4. ಲಭ್ಯವಿದ್ದರೆ Encoding ನಲ್ಲಿ UTF-8 ಆಯ್ಕೆಮಾಡಿ.
  5. Folder ಆಯ್ಕೆಮಾಡಿ Save ಮಾಡಿ.

Important: File index.html.txt ಎಂಬ ಹೆಸರಿನಲ್ಲಿ Save ಆಗದಂತೆ ಗಮನಿಸಿ.

Step 4: Browser ನಲ್ಲಿ Open ಮಾಡಿ

Save ಮಾಡಿದ index.html File ಮೇಲೆ Double-click ಮಾಡಿ. ಅದು Default Browser ನಲ್ಲಿ Open ಆಗುತ್ತದೆ. ಅಗತ್ಯವಿದ್ದರೆ Open with ಮೂಲಕ ಬೇರೆ Browser ಆಯ್ಕೆಮಾಡಬಹುದು.

TextEdit ಬಳಸಿ HTML ಬರೆಯುವುದು (macOS)

Mac ಬಳಸುತ್ತಿದ್ದರೆ TextEdit ಮೂಲಕ HTML File ರಚಿಸಬಹುದು.

  1. Applications ಅಥವಾ Spotlight Search ಮೂಲಕ TextEdit Open ಮಾಡಿ.
  2. Format → Make Plain Text ಆಯ್ಕೆಮಾಡಿ.
  3. ಕೆಳಗಿನ Code ಬರೆಯಿರಿ:
html
<!DOCTYPE html>
<html>
<head>
    <title>My HTML Page</title>
</head>
<body>
    <h1>Hello from Mac!</h1>
    <p>I created this page using TextEdit.</p>
</body>
</html>
  1. File → Save ಆಯ್ಕೆಮಾಡಿ.
  2. File Name ಅನ್ನು index.html ಎಂದು ನಮೂದಿಸಿ.
  3. .html ಅಥವಾ .txt ಆಯ್ಕೆ ಮಾಡಲು ಕೇಳಿದರೆ .html ಆಯ್ಕೆಮಾಡಿ.
  4. ಲಭ್ಯವಿದ್ದರೆ Automatically .txt ಸೇರಿಸುವ Option Disable ಮಾಡಿ ಮತ್ತು UTF-8 Encoding ಬಳಸಿ.
  5. Finder ಮೂಲಕ File ಅನ್ನು Safari, Chrome ಅಥವಾ ಬೇರೆ Browser ನಲ್ಲಿ Open ಮಾಡಿ.

Important: HTML Code ಅನ್ನು Rich Text ಬದಲಿಗೆ Plain Text ಆಗಿ Save ಮಾಡಿ.

Visual Studio Code ಬಳಸಿ HTML ಬರೆಯುವುದು

Visual Studio Code (VS Code) ಎನ್ನುವುದು Microsoft ಅಭಿವೃದ್ಧಿಪಡಿಸಿದ ಜನಪ್ರಿಯ Code Editor ಆಗಿದೆ.

ಇದರ ಪ್ರಮುಖ Features:

  • Syntax Highlighting
  • Auto-completion
  • File ಮತ್ತು Folder Management
  • Integrated Terminal
  • Extensions
  • Built-in HTML Support

Steps:

  1. Official Website ನಿಂದ VS Code Download ಮಾಡಿ Install ಮಾಡಿ: https://code.visualstudio.com/
  2. VS Code Open ಮಾಡಿ.
  3. File → New Text File ಆಯ್ಕೆಮಾಡಿ.
  4. File ಅನ್ನು index.html ಹೆಸರಿನಲ್ಲಿ Save ಮಾಡಿ.
  5. ಕೆಳಗಿನ Code ಬರೆಯಿರಿ:
html
<!DOCTYPE html>
<html>
<head>
    <title>Learning HTML</title>
</head>
<body>
    <h1>HTML with VS Code</h1>
    <p>Learning HTML is fun!</p>
</body>
</html>
  1. Code Save ಮಾಡಿ.
  2. HTML File ಅನ್ನು Browser ನಲ್ಲಿ Open ಮಾಡಿ.

Note: VS Code ಒಂದು Code Editor, Web Browser ಅಲ್ಲ. Rendered Output ನೋಡಲು HTML File ಅನ್ನು Browser ನಲ್ಲಿ Open ಮಾಡಬೇಕು.

W3PrimeCode ನಲ್ಲಿ Online HTML Practice

W3PrimeCode Code Sandbox ನಲ್ಲಿ ಈ ಸೌಲಭ್ಯ ಲಭ್ಯವಿದ್ದರೆ Local File ರಚಿಸದೆ HTML Code ಬರೆದು Output ನೋಡಬಹುದು. Free Online HTML Code Editor

Example:

html
<!DOCTYPE html>
<html>
<head>
    <title>Online HTML Example</title>
</head>
<body>
    <h1>Hello, W3PrimeCode!</h1>
    <p>I am practicing HTML online.</p>
</body>
</html>

Heading ಮತ್ತು Paragraph Text ಬದಲಾಯಿಸಿ Code ಮತ್ತೆ Run ಮಾಡಿ.

HTML File Extensions

HTML Documents ಸಾಮಾನ್ಯವಾಗಿ ಎರಡು Extensions ಬಳಸುತ್ತವೆ:

  • .html
  • .htm

ಎರಡೂ HTML File Extensions ಆಗಿವೆ. ಈ Course ನಲ್ಲಿ .html ಬಳಸುತ್ತೇವೆ.

Valid File Names:

text
index.html
about.html
contact.html
portfolio.html

Incorrect:

text
index.html.txt

ಇದರ ಕೊನೆಯ Extension .txt ಆಗಿರುವುದರಿಂದ File ಒಂದು Text File ಆಗಿ Open ಆಗಬಹುದು.

HTML File Edit ಮಾಡುವುದು ಹೇಗೆ?

  1. Editor ನಲ್ಲಿ index.html Open ಮಾಡಿ.
  2. ಅಗತ್ಯವಿರುವ Code ಬದಲಾಯಿಸಿ.
  3. File Save ಮಾಡಿ.
  4. Browser ಗೆ ಹಿಂತಿರುಗಿ.
  5. Page Refresh ಮಾಡಿ.

ಉದಾಹರಣೆಗೆ:

html
<h1>Welcome to HTML</h1>

ಇದನ್ನು ಹೀಗೆ ಬದಲಾಯಿಸಿ:

html
<h1>Welcome to W3PrimeCode</h1>

Save ಮತ್ತು Refresh ಮಾಡಿದ ನಂತರ ಹೊಸ Heading ಕಾಣಿಸುತ್ತದೆ.

Common Beginner Mistakes

Mistake 1: ತಪ್ಪಾದ File Extension

Incorrect: index.html.txt Correct: index.html

Mistake 2: Changes Save ಮಾಡಲು ಮರೆಯುವುದು

Code ಬದಲಾಯಿಸಿದ ನಂತರ File Save ಮಾಡದಿದ್ದರೆ Browser ನಲ್ಲಿ ಹಳೆಯ Output ಕಾಣಿಸಬಹುದು.

Mistake 3: Editor ಮತ್ತು Browser ಒಂದೇ ಎಂದು ಭಾವಿಸುವುದು

Editor HTML Source Code ತೋರಿಸುತ್ತದೆ. Browser HTML ಅನ್ನು Interpret ಮಾಡಿ Rendered Web Page ತೋರಿಸುತ್ತದೆ.

Mistake 4: Rich Text ಬಳಸುವುದು

TextEdit ನಲ್ಲಿ HTML ಬರೆಯುವ ಮೊದಲು Plain Text Mode ಆಯ್ಕೆಮಾಡಿ.

**Mistake 5: <title> ಮತ್ತು <h1> ಒಂದೇ ಎಂದು ಭಾವಿಸುವುದು**

<title> Browser Tab Title ಅನ್ನು ನಿರ್ಧರಿಸುತ್ತದೆ. <h1> Web Page ನಲ್ಲಿ Heading ರಚಿಸುತ್ತದೆ.

Practical Use Case: Personal Welcome Page

welcome.html ಎಂಬ File ರಚಿಸಿ.

html
<!DOCTYPE html>
<html>
<head>
    <title>My Welcome Page</title>
</head>
<body>
    <h1>Welcome to My Website</h1>
    <p>My name is Alex.</p>
    <p>I am learning HTML with W3PrimeCode.</p>
</body>
</html>

ಈ Example ಮೂಲಕ Editor ಮತ್ತು Browser ಸಹಾಯದಿಂದ ಸರಳ Web Page ಹೇಗೆ ರಚಿಸಬಹುದು ಎಂಬುದನ್ನು ತಿಳಿಯಬಹುದು.

Try It Yourself

my-profile.html ಎಂಬ File ರಚಿಸಿ.

html
<!DOCTYPE html>
<html>
<head>
    <title>My Profile</title>
</head>
<body>
    <h1>Your Name</h1>
    <p>Your introduction goes here.</p>
</body>
</html>

ನಿಮ್ಮ Tasks:

  1. Your Name ಬದಲಿಗೆ ನಿಮ್ಮ ಹೆಸರನ್ನು ಬರೆಯಿರಿ.
  2. ನಿಮ್ಮ ಆಸಕ್ತಿಗಳ ಬಗ್ಗೆ ಒಂದು ವಾಕ್ಯ ಸೇರಿಸಿ.
  3. Browser Tab Title ಬದಲಾಯಿಸಿ.
  4. File ಅನ್ನು .html Extension ನೊಂದಿಗೆ Save ಮಾಡಿ.
  5. Browser ನಲ್ಲಿ Open ಮಾಡಿ.
  6. ಮತ್ತೊಂದು ಬದಲಾವಣೆ ಮಾಡಿ Save ಮತ್ತು Refresh ಮಾಡಿ.

Practice Exercises

Exercise 1 - Easy: HTML Code ಬರೆಯಲು ಬಳಸುವ ಎರಡು Applications ಹೆಸರುಗಳನ್ನು ಬರೆಯಿರಿ.

Exercise 2 - Easy: HTML Document ಗೆ ಸಾಮಾನ್ಯ File Extension ಯಾವುದು?

Exercise 3 - Medium: TextEdit ನಲ್ಲಿ HTML ಬರೆಯುವ ಮೊದಲು Plain Text Mode ಏಕೆ ಆಯ್ಕೆಮಾಡಬೇಕು?

Exercise 4 - Medium: ಒಂದು Heading ಮತ್ತು Paragraph ಹೊಂದಿರುವ about.html File ರಚಿಸಿ.

Exercise 5 - Challenge: ಸಂಪೂರ್ಣ HTML Document ರಚಿಸಿ Browser ನಲ್ಲಿ Open ಮಾಡಿ. Heading ಬದಲಾಯಿಸಿ Save ಮಾಡಿ ಮತ್ತು Refresh ಮೂಲಕ Updated Content ನೋಡಿ.