Hello,
Why
This code works fine
<p><a href="#about" target="_self">About me</a></p>
<div id="about"><h1 class="background2">About me</h1></div>
But this on does not react at all
<button class="button"><a href="#about" target="_self">About me</a></button>
<div id="about"><h1 class="background2">About me</h1></div>
I’ve edited your post for readability. When you enter a code block into the forum, remember to precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>
) will also add backticks around text.