Html में कई वेब पेजों को एक दूसरे से जोड़ने के लिए <a> tag प्रयोग किया जाता है। इससे एक से दूसरी बेब पेजों पर पहुंचना, डाउनलोड करना आसान हो जाता है। यह मेल करने के लिए भी बनाया जाता है।
What is anchor tag in html in hindi?
Anchor tag को <a> से लिखा जाता है। यह लिंक बनाने के काम आता है। यह टैग web pages को एक-दूसरे से जोड़े रखता है। यह कभी-कभी अगले वेब पेज को उसी टैब में खोल देता है,तो कभी दूसरे टैब में खोलता है। जैसी भी कोडिं ग की जाती है।
How to create hyperlink in html in hindi:
Anchor tag से दूसरे web page लिंक करने के लिए <a href="link url">link name</a> लिखा जाता है। उदाहरण के लिए...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>list example</title>
</head>
<body>
<a href="
www.google.com
">Google</a>
</body>
</html>
और यह ऐसा दिखता है:-
इस पर क्लिक करने पर Google का वेब पेज खुल जाता है।
How to create Downloag Link in HTML:
डाउनलोड का लिंक बनाने के लिए <a href="file url"download> Link name </a> लिखा जाता है।
फाइल url मौजूद होनी चाहिए, नहीं तो डाउनलोड complete नहीं होगा। उदाहरण के लिए-
<a href="index.html"download>Download</a>
Download पर क्लिक करने पर index.html फाइल डाउनलोड होने लगती है।
How to create mail Link in html in hindi:
Mail लिंक बनाने पर उस मेल आईडी पर मेल भेजने की परमिशन मांगी जाती है। परमिशन मिलने पर उस मेल आईडी पर मेल स्वतः ही भेज दिया जाता है। मेल लिंक बनाने के लिए कोडः
<a href="mailto:abc@xyz.com">Mail me</a>
How to set link Target in html:
_blank पर target करने पर लिंक अगले टैब में खुलती है। Target define न करने पर उसी टैब में लिंक खुलती है।
<a href="url" target=_blank>Link name</a>