-->

  • HTML LInks Hyper and Local






    HTML Links 


    Safar :- life ka aisa safar, jo paucha de aapko aapke destination tak, bs shuruaat to karo :- LINKS





    HTML Links - Hyperlinks  


    HTML LInks are Hyper Links.

    You Can Click on a Link and Jump to another Document.

    When you move the mouse over a Link, the mouse arrow will turn into a Little Hand.



    link is specified using HTML tag <a>. This tag is called anchor tag and anything between the opening <a> tag and the closing </a> tag becomes part of thelink and a user can click that part to reach to the linked document.





    HTML Link Syntax 


    HTML Links are Defined with the <a> Tag.

    <a href="url">Link Text</a>





    Example




    <!DOCTYPE html>
    <html>
    <body>

    <h2>HyperLinks</h2>

    <p><a href="https://www.kumaratuljaiswal.in/2018/11/html-images-with-width-and-height.html">HackingTruth</a></p>

    </body>
    </html>









    The href attribute specifies the destination address.

    Clicking on the link text will send you to the specified address.



    Note: Without a forward slash at the end of subfolder addresses, you might generate two requests to the server. Many servers will automatically add a forward slash to the end of the address, and then create a new request.




    Local Links 

    The example above used an absolute URL (a full web address).

    A local link (link to the same web site) is specified with a relative URL (without https://www............).


    Example


    <!DOCTYPE html>
    <html>
    <body>

    <h2>Local Links</h2>

    <p><a href="www.kumaratuljaiswal.in">HTML Images</a> is a link to a page on this website.</p>

    </body>
    </html>









    Chapter Summary

    • Use the <a> element to define a link
    • Use the href attribute to define the link address














  • 0 comments:

    Post a Comment

    For Any Tech Updates, Hacking News, Internet, Computer, Technology and related to IT Field Articles Follow Our Blog.