0

I am a beginner programmer working on a text based game in Visual Studio and the continue button doesn't show up on the webpage. Is there something I missed?

            <p></p>
            <fieldset></fieldset>
            <button id="resetButton" class="reset">Restart</button>
            <a id="continueButton" class="continue" href="javascript:void(0);"></a>
        </form>
    </div>
    <script> src="js.js"></script>
</body>
</html>
Suikurix
  • 27
  • 5

3 Answers3

1

You don't have any text in the a tag.

<a id="continueButton" class="continue" href="javascript:void(0);">PUT YOUR TEXT HERE</a>

John Townsend
  • 316
  • 3
  • 6
1

Your continueButton element is using the <a> tag with nothing in it, so there is nothing to display. Add something inside your <a> tag or change it to a <button> like the resetButton element.

<html>
    <body>
        <button id="resetButton" class="reset">Restart</button>
        <a id="continueButton" class="continue" href="javascript:void(0);">Continue</a>
    </body>
</html>
JCH
  • 170
  • 11
0

Another way to tackle this issue is using developer tools on browsers (Personally, I like Firefox). As you can see from the image, there is something on the right called the box model for the a tag that's been selected.

Without text in between a tags

The height of the a tag is 16 whereas the width is 0. This makes sense as to what you're seeing on the browser. You have a box that is 0x16 (under box model).

Now if I add some text in between the a tags (added the text AAA) you can see that the box is now 34.65x16.

With text in between a tags

Some resources to learn about the box model :

https://web.dev/learn/css/box-model/ https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model

halapgos1
  • 1,130
  • 4
  • 16
  • 34