10 Program to demonstrate Links in HTML

Program:
<!DOCTYPE html>

<html lang="en">



<head>

    <meta charset="UTF-8">

    <title>HTML Anchor Tag</title>

    <style>

        body {

            font-family: Arial, sans-serif;

        }



        p {

            font-size: 30px;

        }

    </style>

</head>



<body>



    <h2 id="C4">Chapter 4</h2>



    <!-- Simple Links -->

    <p>External Links</p>

    <a href="https://google.com/"> Google.com </a>



    <!-- Local Links -->

    <p>Local Links</p>

    <a href="./09_HTML_Tables.html"> HTML Tables </a>



    <!-- Links with target -->

    <p>Links with target</p>

    <a href="https://google.com/" target="_blank"> Google.com </a>





    <!-- Images as Links -->

    <p>Images as Links</p>

    <a href="https://codingatharva.blogspot.com/"> <img src="./logo.png" width="50px" height="50px"> </a>



    <!-- Bookmarks with Ids -->

    <p>Bookmarks with Ids</p>

    <a href="#C4">Jump to Chapter 4</a>



    <!-- Download a file -->

    <p>Download a file</p>

    <a href="./logo.png" download> Download Logo Image </a>

</body>



</html>


Output:
Links in HTML


Previous
Next Post »