The <a> (anchor) element creates a hyperlink। Its href is the destination, which can be a URL, a path, an in-page anchor, or a special scheme।
External site
Internal page (relative)
Jump to an element with id="section2"
Send email
Call us
The <a> (anchor) element creates a hyperlink। Its href is the destination, which can be a URL, a path, an in-page anchor, or a special scheme।
External site
Internal page (relative)
Jump to an element with id="section2"
Send email
Call us
<a href="https://other.com" target="_blank" rel="noopener noreferrer">
Opens in a new tab
</a>
target="_blank" ले नयाँ ट्याब खोल्छ, तर तपाईंले rel="noopener" थप्नु पर्छ: यो बिना, नयाँ पेज window.opener को पहुँच गर्न सक्छ र सम्भाव्यताको साथ तपाईंको पेज पुनर्निर्देशन गर्न सक्छ (एक "tab-nabbing" आक्रमण)। noreferrer ले referrer header पनि हटाउँछ। आधुनिक ब्राउजरहरूले _blank को लागि noopener निहित गर्छन्, तर यसलाई स्पष्ट रूपमा थप्नु सर्वोत्तम अभ्यास हो।
<a href="..." rel="nofollow">Don't pass SEO ranking (untrusted/user links)</a>
<a href="..." rel="noopener">Security: no window.opener access</a>
<a href="..." rel="sponsored">Paid/affiliate link</a>
<a href="#top">Back to top</a>
...
<div id="top">...</div> <!-- the link scrolls here -->
क्लिक गर्दा fragment सँग मेल खाने id भएको तत्वमा स्क्रल हुन्छ।
Anchors वेबको नेविगेसनको मेरुदण्ड हो।
href schemes (relative, absolute, fragment, mailto/tel), target="_blank" + rel="noopener" सुरक्षा जोडी, र SEO-सम्बन्धित rel मानहरू जान्नु सही, सुरक्षित लिङ्किङको लागि आवश्यक छ।