URL in HTML

URL Kya Hota Hai?

A URL in HTML is used to locate resources on the internet.URL ka full form hai Uniform Resource Locator. Simple words me bole to URL matlab web address.

Example:

Log normally website ka naam type karte hain kyunki naam yaad rakhna easy hota hai numbers se.


Structure of a URL in HTML

Ek URL ka format kuch aisa hota hai:

Structure of URL

Example:

URL in HTML

Iska Breakdown Samjho:

  • scheme → Internet service type (http ya https)
  • prefix → Usually www
  • domain → Website ka naam (example.com)
  • port → Server ka port number (default http ke liye 80)
  • path → Server ke andar ka folder location (/blog/)
  • filename → File ka naam (index.html)

Common URL Schemes

  1. http → Normal web pages (not secure)
  2. https → Secure web pages (encrypted)
  3. ftp → Files upload/download karne ke liye
  4. file → Apne computer ki file access karne ke liye

Example:


URL Encoding Kya Hota Hai?

Internet sirf ASCII character set ko directly send kar sakta hai.
Agar URL me special ya non-ASCII characters hote hain, to unhe convert karna padta hai. Is process ko URL Encoding kehte hain.

Kaise Kaam Karta Hai?

  • Special characters ko % ke saath hexadecimal value me convert kiya jata hai.
  • Space ko normally + ya %20 se replace kiya jata hai.

Example:

Agar text hai: Hello Günter, toh browser isko encode karega kyunki “ü” normal ASCII me nahi hai.

Example conversions:

  • Space → %20
  • € → %E2%82%AC (UTF-8 me)
  • £ → %C2%A3

Understanding URL in HTML helps developers link web resources properly.

Leave a Comment