code hindi Information technologyCareer blogs Courses info Digital Marketing About

HTML Kaise Kaam Karta Hai? | Web Development Ki Basic Samajh

HTML Kya Hai?

HTML ka full form hai HyperText Markup Language. Yeh ek markup language hai jo web pages ko structure dene ke liye use hoti hai. Matlab, jab bhi aap kisi website ko dekhte hain, toh us page ka jo basic structure hota hai – headings, paragraphs, images, links – yeh sab HTML ke through banaye jaate hain.

HTML Kaise Kaam Karta Hai?

HTML ek markup language hai, jo text ko specific elements mein organize karne ka kaam karta hai. Iska kaam content ko define karna hota hai. HTML ko samajhne ke liye, hum basic structure ko samajh sakte hain.

1. HTML Structure:

HTML ka structure elements ke through hota hai. Har element ka ek tag hota hai, jisme opening aur closing tags hote hain. For example:

          <html>
          <head>
          <title>My Website</title>
                </head>
                <body>
                <h1gt;Welcome to My Website</h1>
                <p>This is a paragraph </p>
                </body>
                </html>
        

Yahaan, `<html>` tag se HTML document ka start hota hai. Uske baad `<head>` aur `<body>` sections aate hain. `<head>` mein webpage ki meta information hoti hai, jaise title aur styles. `<body>` mein jo content dikhega wo hota hai, jaise headings, text, images, etc.

2. HTML Tags:

HTML tags kuch predefined keywords hote hain jo content ko specify karte hain. Jaise:

  • - `<h1>`: Heading 1, jo webpage par sabse bada heading hota hai.
  • - `<p>`: Paragraph tag, jo text ko paragraphs mein divide karta hai.
  • - `<a>`: Anchor tag, jo links create karta hai.
  • - `<img>`: Image tag, jo images ko display karta hai.
3. Rendering Process:

Jab aap browser par HTML page open karte hain, browser HTML code ko read karta hai aur uska structure render karta hai. Yeh rendering process browser ke render engine ke through hota hai.

Browser Rendering Process :
  • - Browser sabse pehle HTML ko parse karta hai.
  • - HTML ko render tree mein convert karta hai.
  • - Uske baad CSS ko apply karta hai.
  • - Finally, content ko screen par display karta hai.
4. HTML & DOM (Document Object Model):

Jab HTML code browser mein render hota hai, tab browser ek internal structure banata hai jise DOM (Document Object Model) kehte hain. DOM ko aap JavaScript ke through modify kar sakte hain. Yeh ek tree structure hota hai jisme HTML elements ko nodes ke roop mein represent kiya jata hai.

5. Interactive Elements:

HTML ka use static content banane ke liye hota hai, lekin jab aap JavaScript ya CSS ka use karte hain, tab aap apne webpage ko interactive bana sakte hain. JavaScript ke through aap events handle kar sakte hain, jaise button click ya form submission.

Example:

Ek simple HTML code ka example dekhte hain:

       <!DOCTYPE html>
       <html>
       <head>
       <title>My First Web Page</title>
          </head>
          <body>
          <h1>Welcome to My First Web Page</h1>
              <p>This is a simple HTML page.</p>
              <a href="https://www.example.com">Visit Example</a>
              </body>
              </html>
       
     

Is code mein, `<h1>` ek heading create karega, `<p>` ek paragraph show karega, aur `<a>` ek link banayega jo "Visit Example" text display karega.

Conclusion:

Toh dosto, aaj humne jaana ki HTML kaise kaam karta hai. Humne dekha ki HTML ek markup language hai jo web pages ko structure dene ka kaam karta hai. HTML tags, browser rendering, aur DOM ka concept samajhne se aapko web development ka basic structure samajhne mein madad milegi.

Server kya hota hai

Integrated Development Environment (IDE) kya hai