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++
| Feature | Basic Text Editor | Code Editor |
|---|---|---|
| HTML ಬರೆಯುವುದು | Yes | Yes |
| Syntax Highlighting | ಸಾಮಾನ್ಯವಾಗಿ ಸೀಮಿತ | Yes |
| Auto-completion | ಸಾಮಾನ್ಯವಾಗಿ ಸೀಮಿತ | ಲಭ್ಯ |
| File Management | Basic | Advanced |
| 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 ಬರೆಯಿರಿ
<!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 ಮಾಡಿ
- File → Save As ಆಯ್ಕೆಮಾಡಿ.
- File Name ನಲ್ಲಿ
index.htmlಬರೆಯಿರಿ. - Save as type ನಲ್ಲಿ
All Filesಆಯ್ಕೆಮಾಡಿ. - ಲಭ್ಯವಿದ್ದರೆ Encoding ನಲ್ಲಿ
UTF-8ಆಯ್ಕೆಮಾಡಿ. - 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 ರಚಿಸಬಹುದು.
- Applications ಅಥವಾ Spotlight Search ಮೂಲಕ TextEdit Open ಮಾಡಿ.
- Format → Make Plain Text ಆಯ್ಕೆಮಾಡಿ.
- ಕೆಳಗಿನ Code ಬರೆಯಿರಿ:
<!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>- File → Save ಆಯ್ಕೆಮಾಡಿ.
- File Name ಅನ್ನು
index.htmlಎಂದು ನಮೂದಿಸಿ. .htmlಅಥವಾ.txtಆಯ್ಕೆ ಮಾಡಲು ಕೇಳಿದರೆ.htmlಆಯ್ಕೆಮಾಡಿ.- ಲಭ್ಯವಿದ್ದರೆ Automatically
.txtಸೇರಿಸುವ Option Disable ಮಾಡಿ ಮತ್ತು UTF-8 Encoding ಬಳಸಿ. - 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:
- Official Website ನಿಂದ VS Code Download ಮಾಡಿ Install ಮಾಡಿ: https://code.visualstudio.com/
- VS Code Open ಮಾಡಿ.
- File → New Text File ಆಯ್ಕೆಮಾಡಿ.
- File ಅನ್ನು
index.htmlಹೆಸರಿನಲ್ಲಿ Save ಮಾಡಿ. - ಕೆಳಗಿನ Code ಬರೆಯಿರಿ:
<!DOCTYPE html>
<html>
<head>
<title>Learning HTML</title>
</head>
<body>
<h1>HTML with VS Code</h1>
<p>Learning HTML is fun!</p>
</body>
</html>- Code Save ಮಾಡಿ.
- 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:
<!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:
index.html
about.html
contact.html
portfolio.htmlIncorrect:
index.html.txtಇದರ ಕೊನೆಯ Extension .txt ಆಗಿರುವುದರಿಂದ File ಒಂದು Text File ಆಗಿ Open ಆಗಬಹುದು.
HTML File Edit ಮಾಡುವುದು ಹೇಗೆ?
- Editor ನಲ್ಲಿ
index.htmlOpen ಮಾಡಿ. - ಅಗತ್ಯವಿರುವ Code ಬದಲಾಯಿಸಿ.
- File Save ಮಾಡಿ.
- Browser ಗೆ ಹಿಂತಿರುಗಿ.
- Page Refresh ಮಾಡಿ.
ಉದಾಹರಣೆಗೆ:
<h1>Welcome to HTML</h1>ಇದನ್ನು ಹೀಗೆ ಬದಲಾಯಿಸಿ:
<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 ರಚಿಸಿ.
<!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 ರಚಿಸಿ.
<!DOCTYPE html>
<html>
<head>
<title>My Profile</title>
</head>
<body>
<h1>Your Name</h1>
<p>Your introduction goes here.</p>
</body>
</html>ನಿಮ್ಮ Tasks:
Your Nameಬದಲಿಗೆ ನಿಮ್ಮ ಹೆಸರನ್ನು ಬರೆಯಿರಿ.- ನಿಮ್ಮ ಆಸಕ್ತಿಗಳ ಬಗ್ಗೆ ಒಂದು ವಾಕ್ಯ ಸೇರಿಸಿ.
- Browser Tab Title ಬದಲಾಯಿಸಿ.
- File ಅನ್ನು
.htmlExtension ನೊಂದಿಗೆ Save ಮಾಡಿ. - Browser ನಲ್ಲಿ Open ಮಾಡಿ.
- ಮತ್ತೊಂದು ಬದಲಾವಣೆ ಮಾಡಿ 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 ನೋಡಿ.