(SOLVED) Wikipedia viewer - Codepen refreshing on button click?

I just started setting up my Wikipedia viewer project but I’m seeing some weird behavior and I cannot figure out why it is happening. If I enter a term and press enter or click the submit button, it looks like the entire page refreshes? I can see content load in my targeted div but then it quickly disappears.

Can someone please explain why this happens?

You have to delete form tag from yout html. You close after the button and this create an issue. :slight_smile:

1 Like

That did the trick. But why does the form tag cause issues? And is it not necessary to wrap my input and button in a form tag?

Thank you so much for that explanation!