HTML Editors
To create and edit HTML files, you need a code editor.
- Offline Editors: Visual Studio Code, Sublime Text, Notepad++
VS Code is highly recommended for beginners. It supports syntax highlighting, extensions, and live preview.
HTML फाइल बनाने और एडिट करने के लिए एक कोड एडिटर की जरूरत होती है।
- ऑफलाइन एडिटर: Visual Studio Code, Sublime Text, Notepad++
VS Code शुरुआती लोगों के लिए सबसे उपयुक्त है क्योंकि इसमें सिंटैक्स हाइलाइटिंग, एक्सटेंशन और लाइव प्रिव्यू सपोर्ट है।
Example: HTML Template in VS Code
<!DOCTYPE html>
<html>
<head>
<title>My Web Page</title>
</head>
<body>
<h1>Welcome!</h1>
<p>This is written using VS Code.</p>
</body>
</html>
How to Run an HTML Program
- Use a Text Editor: Open Notepad, Notepad++, Sublime, or VS Code.
- Write HTML Code: Create your HTML code in the editor.
- Save the File: Save it with a
.html
extension, likeindex.html
. - Open in Browser: Double-click the file or right-click → Open with Chrome/Firefox.
- Use Online Editors: Try JSFiddle, CodePen, or W3Schools Editor for instant preview.
- Live Server in VS Code: Use the “Live Server” extension to auto-refresh your page as you edit.
HTML प्रोग्राम कैसे चलाएं
- टेक्स्ट एडिटर खोलें: Notepad, Notepad++, Sublime या VS Code का उपयोग करें।
- HTML कोड लिखें: एडिटर में HTML कोड बनाएं।
- फाइल सेव करें:
.html
एक्सटेंशन के साथ सेव करें, जैसेindex.html
। - ब्राउज़र में खोलें: फाइल पर डबल-क्लिक करें या राइट-क्लिक करके Chrome/Firefox में खोलें।
- VS Code का Live Server: “Live Server” एक्सटेंशन इंस्टॉल करें और कोड लाइव देखें।