HTML Basic - The Web's Skeleton

Suraj KumarSuraj Kumar
3 min read

๐Ÿงฑ HTML for Beginners โ€“ Webpage ka Skeleton

Socho tum ek ghar bana rahe ho.

Ghar banane se pehle ek naksha (blueprint) banta hai โ€” jisme decide hota hai ki bedroom kidhar hoga, kitchen kaunse kone mein hoga, aur gate kaha lagega.

Waise hi HTML bhi ek webpage ka naksha hota hai.
Yeh batata hai ki webpage ke alag-alag parts ka layout kya hoga โ€“ jaise heading kaha aayegi, paragraph kaha, image kaha.

HTML sirf structure deta hai โ€” jaise ghar ki deewar.
Design (color, styling) ke liye CSS hota hai,
aur functionality (click, animation) ke liye JavaScript.

๐Ÿงพ Ek Simple HTML Code Example:

<!DOCTYPE html>
<html>
  <head>
    <title>Mera Pehla Page</title>
  </head>
  <body>
    <h1>Namaste Duniya!</h1>
    <p>Yeh mera pehla webpage hai.</p>
  </body>
</html>

๐Ÿ” Yeh kya kar raha hai?

  • <!DOCTYPE html> โ€“ Browser ko batata hai ki yeh HTML5 hai.

  • <html> โ€“ Yeh root tag hai, iske andar poora page likha jaata hai.

  • <head> โ€“ Jo cheeze screen par nahi dikhengi (jaise title, SEO info).

  • <title> โ€“ Browser ke tab me jo naam dikhega.

  • <body> โ€“ Yahi main area hai jahan user ko content dikhai deta hai.


๐Ÿ”’ Kuch Zaroori Good Practices:

โœ… Har opening tag ka closing tag hona chahiye
โœ… Tags ko andar properly nest karo
โœ… Tabs/spacing se code ko readable banao
โœ… Semantic tags ka use karo โ€” SEO aur screen readers ke liye best


๐Ÿท๏ธ HTML Tags aur Elements โ€“ Friendly Way mein

๐Ÿ”น Tag kya hota hai?

Tag ek instruction hai browser ke liye โ€” "ye text ek heading hai", "ye image dikhani hai", etc.

Example:

<h1>Heading</h1>
  • <h1> = opening tag

  • </h1> = closing tag

  • Heading = content

๐Ÿ”น Element kya hota hai?

Element = tag + content + closing tag

Jise tum aur main dekhte hain browser mein, woh element hota hai.


๐Ÿ“˜ Semantic vs Non-Semantic Tags โ€“ Fark kya hai?

๐Ÿ”ค Semantic Tags:

Aise tags jo apne naam se hi samjha dete hain ki unka kaam kya hai:

<header>Page Ka Header</header>
<article>Ek Article</article>
<footer>Page Ka Footer</footer>

Yeh tags meaning bhi dete hain aur structure bhi.

โ“ Non-Semantic Tags:

Aise tags jinka naam se kaam samajh nahi aata:

<div>Header Yahan Hai</div>
<div>Yeh Content Hai</div>

Dono ka kaam same ho sakta hai, lekin semantic tags se search engine aur screen readers ko help milti hai.

SemanticNon-Semantic
<header><div>
<nav><div>
<footer><div>
<article><div>

๐Ÿ“„ HTML Document Ka Structure

<!DOCTYPE html>
โ””โ”€โ”€ <html>
    โ”œโ”€โ”€ <head>
    โ”‚   โ””โ”€โ”€ <title>
    โ””โ”€โ”€ <body>
        โ”œโ”€โ”€ <h1>
        โ””โ”€โ”€ <p>

โš–๏ธ Semantic vs Non-Semantic Comparison

Semantic Version:

<section>
  <header>Welcome</header>
  <article>Main Content</article>
  <footer>Contact Info</footer>
</section>

Non-Semantic Version:

<div>
  <div>Welcome</div>
  <div>Main Content</div>
  <div>Contact Info</div>
</div>

Dekhne me same lagta hai, par pehle wale version me structure aur meaning dono clear hai.


๐Ÿ”š Conclusion โ€“ Ek Line Me Samjho:

HTML ek webpage ka dhancha (structure) hai.
Tags aur elements milke us structure ko banate hain.
Semantic tags se meaning aur accessibility dono improve hoti hai.

0
Subscribe to my newsletter

Read articles from Suraj Kumar directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Suraj Kumar
Suraj Kumar

I am MERN STACK Web Developer.I am Student of BCA.