Search code examples
htmlcodepen

Cant get my link in my html to work


<form action="http://www.spacex.com/" method="get">
    <button type="submit" class="btn btn-primary">SpaceX</button>
</form>

Can't tell if it's my code that's wrong or the compiler off of CodePen. Anyways #save-my-code


Solution

  • Give this a try:

    <a href="spacex.com/" class="btn btn-primary">SpaceX</a>