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:
- https://www.google.com
- 192.168.20.50 (IP address)
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:
![]()
Example:
![]()
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
- http → Normal web pages (not secure)
- https → Secure web pages (encrypted)
- ftp → Files upload/download karne ke liye
- file → Apne computer ki file access karne ke liye
Example:
- http://example.com
- https://secure-site.com
- ftp://fileserver.com
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.