-3

I have created 2 pages with CSS and HTML and now I want to link the two together.

I found this code, but I am sure there are better options:

<form action="http://google.com">
    <input type="submit" value="Go to Google" />
</form> 

If I use this, do I have to upload both pages to the internet? How can I link my two pages together?

James Whiteley
  • 3,363
  • 1
  • 19
  • 46

3 Answers3

0

Try below code,

<a href="http://google.com">Go to Googl</a>
Akil Makda
  • 373
  • 1
  • 3
  • 9
0

If you wanna stick to your Form approach, see below:

<form action="http://www.google.com">
  <button type="submit" class="">Go to Google</button>
</form>

more elegant is this:

<a href="http://www.google.com/">
 <input type="button" value="Go to Google" />
</a>
Cyber
  • 2,194
  • 4
  • 22
  • 41
-1

Try this code, It will help you to learn HTML & Bootstrap

<html>
<head>
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
</head>
<body>

<div class="container">

  <a href="https://www.google.com/" class="btn btn-info" role="button">Click Here</a>

</div>
</body>
</html>

objectif
  • 72
  • 5