0

I have this bit of HTML.

<h4><a href="#">MERN-Shopping-List</a></h4>

If we disregard the # because I know that any link put in there will just result in me being able to click anywhere on the page and go to it, which is not what I want to achieve.

This bit of HTML is inside this:

<div class="row align-items-center no-gutters mb-4 mb-lg-5">
  <div class="col-xl-8 col-lg-7">
    <img class="img-fluid mb-3 mb-lg-0" src="img/mern.png" alt="">
  </div>
  <div class="col-xl-4 col-lg-5">
    <div class="featured-text text-center text-lg-left">
      <h4><a href="#">MERN-Shopping-List</a></h4>
      <p class="text-black-50 mb-0">This application allows you to register, log in, and log out users and be able to add and delete items to the list. This shopping list was built with the MERN stack with Redux.</p>
    </div>
  </div>
</div>

I have put the anchor tag inside of the proper h4 tag, so why am I allowed to click anywhere and still be able to go to that link?

I have other h4 tags that need separate links attached to them as well.

Nazim Kerimbekov
  • 4,712
  • 8
  • 34
  • 58
mph85
  • 1,276
  • 4
  • 19
  • 39
  • you mean, when you clicking anywhere on the screen, the anchor tag calling? – sagar dhiman May 11 '19 at 04:37
  • Are you sure this is not a CSS problem? When viewing the snippet you can only click the `

    `. Which is what you wanted, correct?

    – Kelvin May 11 '19 at 08:18
  • yeah anywhere else i click, it goes to whatever link it is – mph85 May 11 '19 at 10:43
  • i dont think it's a css thing? In my application, there are other h4 tags that need to have different links in them, they are right below this piece of HTML – mph85 May 11 '19 at 10:44

0 Answers0