Creating and Saving HTML Document

Creating and Saving HTML Document

🔷 1. Introduction:

Every web page starts with an HTML file. To create a website, we first need to write HTML code and then save it properly. This is the very first step in web development.


🔷 2. Definition:

Creating and Saving an HTML Document means writing HTML code using any text editor and saving it with a .html extension. This file can then be opened in a web browser to see the web page.


🔷 3. Example (Code + Tags):

<!DOCTYPE html>
<html>
  <head>
    <title>My First Page</title>
  </head>
  <body>
    <h1>Hello, World!</h1>
    <p>This is my first HTML document.</p>
  </body>
</html>

🔷 4. Real Life Example:

Imagine you’re creating a personal website. The first step is to write your content in HTML. Once saved as index.html, you can view your site in Chrome, Firefox, or any browser.


🔷 5. Practical Use (Steps to Create and Save):

🔹 Step 1: Open a text editor

  • Notepad (Windows)
  • VS Code / Notepad++ (Better options)

🔹 Step 2: Write HTML code

Use basic structure (as above)

🔹 Step 3: Save the file

  • Go to File → Save As
  • Filename: mypage.html
  • Save as type: All Files
  • Encoding: UTF-8

🔹 Step 4: Open in a browser

  • Right click the file → Open with → Chrome or any browser
  • You will see your webpage

🔷 6. Output:

  • Browser tab shows title: My First Page
  • Page content:
    • Heading: Hello, World!
    • Paragraph: This is my first HTML document.

🔷 7. Advantages:

  • Simple to create
  • Does not need special software
  • Can be run on any device
  • Quick to test and edit
  • Easy to share via email or upload online

🔷 8. Limitations:

  • Code must be saved correctly with .html extension
  • If you make mistakes in syntax, browser may not show correct output
  • Only HTML is not enough – you need CSS/JS for better design

In Hindi


🔷 1. परिचय (Introduction):

हर वेबसाइट या वेब पेज की शुरुआत एक HTML फाइल से होती है।
HTML कोड लिखकर हम एक वेबपेज तैयार करते हैं।
उसे सही तरीके से सेव करके हम ब्राउज़र में देख सकते हैं।
यह वेब विकास (Web Development) का सबसे पहला कदम होता है।


🔷 2. परिभाषा (Definition):

HTML दस्तावेज़ बनाना और सेव करना का अर्थ है –
HTML कोड को किसी टेक्स्ट एडिटर (जैसे Notepad) में लिखना और उसे .html एक्सटेंशन के साथ सेव करना।
इसके बाद, हम उसे किसी भी वेब ब्राउज़र में खोल सकते हैं।


🔷 3. उदाहरण (Example – कोड सहित):

<!DOCTYPE html>
<html>
  <head>
    <title>मेरा पहला पेज</title>
  </head>
  <body>
    <h1>नमस्ते दुनिया!</h1>
    <p>यह मेरा पहला HTML दस्तावेज़ है।</p>
  </body>
</html>

🔷 4. वास्तविक जीवन उदाहरण (Real Life Example):

मान लीजिए आप अपनी खुद की वेबसाइट बना रहे हैं।
सबसे पहले आप HTML में अपना नाम और जानकारी लिखेंगे।
फिर आप उसे index.html नाम से सेव करेंगे।
अब जब आप इसे Chrome में खोलेंगे, आपकी वेबसाइट दिखाई देगी।


🔷 5. प्रायोगिक उपयोग (Practical Use – HTML दस्तावेज़ कैसे बनाएं?):

🔹 चरण 1: टेक्स्ट एडिटर खोलें

  • Notepad (Windows में)
  • या VS Code / Notepad++ (बेहतर विकल्प)

🔹 चरण 2: HTML कोड लिखें

ऊपर दिया गया बेसिक कोड प्रयोग करें

🔹 चरण 3: फाइल को सेव करें

  • File → Save As पर क्लिक करें
  • File Name: mypage.html
  • Save as type: All Files चुनें
  • Encoding: UTF-8 रखें

🔹 चरण 4: ब्राउज़र में खोलें

  • HTML फाइल पर राइट क्लिक करें → Open with → Chrome
  • अब आपका वेबपेज खुलेगा

🔷 6. आउटपुट (Output):

  • ब्राउज़र टैब में टाइटल दिखाई देगा: मेरा पहला पेज
  • पेज पर दिखाई देगा:
    • हैडिंग: नमस्ते दुनिया!
    • पैरा: यह मेरा पहला HTML दस्तावेज़ है।

🔷 7. लाभ (Advantages):

  • बनाना बहुत आसान है
  • किसी भी कंप्यूटर में काम करता है
  • इंटरनेट के बिना भी पेज दिखता है
  • जल्दी परीक्षण (Testing) किया जा सकता है
  • फ्री में तैयार किया जा सकता है

🔷 8. सीमाएँ (Limitations):

  • .html एक्सटेंशन सही देना जरूरी है
  • कोड में गलती होने पर ब्राउज़र सही आउटपुट नहीं देगा
  • सिर्फ HTML से सुंदर वेबसाइट नहीं बनती, CSS और JS की भी जरूरत होती है

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *