- What is HTML Links
- Introduction to HTML Links
- What is anchor tag in HTML
Introduction to HTML Links
html links किसी भी web page के लिए बहुत ही important होता है | क्योकि बिना link के हम सिर्फ एक ही web page बना सकते है और हमे web site बनाने के लिए html link की आवस्यकता पड़ती है | क्योकि एक website के अन्दर बहुत सारे web pages होते है | अगर किसी web page को access करना है | तो हम html links का use कर सकते है |
html links पर जब cursor ले जाते है तो वह clickable hand मे convert हो जाता है | और clickable text या image को ही html links कहा जाता है | html मे text या image को link मे convert करने के लिए हमे anchor tag का use करना पड़ता है | जिसको हम <a> tag से represent करते है |
<a href="css/mp/index.html" target="blank" download="12345"> Click Here </a>
Href Attribute
इस attribute के द्वारा page open किया जाता है यानी href attribute के अन्दर उस page का address देंगे जिसको हम open करना चाहते है | निचे दिये गये example को देखे |
<a href="css/mp/index.html"> Click Here </a>
Target Attribute
इस attribute के द्वारा web page को new tab मे open किया जाता है यह एक optional attribute है | अगर इस attribute का use नही करते है तो web page उसी tab मे open हो जायेगा जिस page पर आप already है | इस attribute के कुछ predefined values है जिसे हम use कर सकते है |
_blank
जब आप _blank value का use करते है तो आपका web page एक new tab मे open होता है | या new windows मे open होता है |
_Self
जब आप _self value का use करते है तो आपका web page उसी tab मे open होगा जिसमे आप currently है
_parent
इस value का use करने से आपका web page parent frame मे open होगी |
_Top
जब आप _top value का use करते है तो आपका web page full document मे open होता है
Customframe
आप खुद का भी एक custom frame बना सकते है ऐसा करने से आपका web page उसी frame मे open होगा जिसे आपने बनाया है | निचे दिये गये example को देखे |
<a href="css/mp/index.html" target="_blank"> Click Here </a> <a href="css/mp/index.html" target="_self"> Click Here </a> <a href="css/mp/index.html" target="_parent"> Click Here </a> <a href="css/mp/index.html" target="_top"> Click Here </a>
Download Attribute
इस attribute के द्वारा किसी भी file को download कर सकते है | for example – audio , video , image etc | अगर download attribute का use नही करते है तो आपकी audio , video , image download होने के वजय वही पर open हो जाएगी |
<a href="MoviesName.mp4" target="_blank" download="Movies Name"> Click Here </a>
Create HTML links
जैसा की मै आपको बताया link create करने के लिए हमे <a> tag का use करना पड़ता है तो निचे दिये गये code को देखे |
<!DOCTYPE html> <html> <head> <title>Easy Hindi Tutorials</title> </head> <body> <p><a href="https://www.google.com">Easy Hindi Tutorials</a></p> <p><a href="https://www.youtube.com">Easy Hindi Tutorials</a></p> <p><a href="https://www.yahoo.com">Easy Hindi Tutorials</a></p> </body> </html>
HTML Attributes | HTML Image Tag |
Previous | Next |
---|