How to Put or Wrap Button Tag as a Nested Child Element inside Anchor (a) Link Tag to Make it Clickable Using HTML5 Full Project For Beginners


Welcome folks today in this blog post we will be putting or wrapping button tag as a nested child element inside anchor (a) link tag to make it clickable  in browser.All the full source code of the application is given below.




Get Started




In order to get started you need to make an index.html file and copy paste the following code






<!DOCTYPE html>
        Create an HTML button that
        acts like a link
    <!-- Style to create button -->
        .GFG {
            background-color: white;
            border: 2px solid black;
            color: green;
            padding: 5px 10px;
            text-align: center;
            display: inline-block;
            font-size: 20px;
            margin: 10px 30px;
            cursor: pointer;

    <!-- Adding button inside the link tag -->
    <a href=''>
        <button class="GFG">
            Click Here


Leave a Reply