Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

157
Views
Why is my HTML button not working when trying to switch to different section of webpage?

I am very new and I am working on my website. My hosting service is IPage. When I try changing to a different section of the website with a button it doesn't work. Here is my code:

<button onclick='https://rgulewicz2438602.ipage.com/About.html'>About</button>
about 4 years ago · Juan Pablo Isaza
3 answers
Answer question

0

onclick is call for a event, so u need put an action on him, not url. To redirect to another page you can use window.location, like this:

<button onclick='window.location="https://rgulewicz2438602.ipage.com/About.html"'>About</button>
about 4 years ago · Juan Pablo Isaza Report

0

You should use an anchor tag to change the location of a page, like so:

<a class="btn" href='https://rgulewicz2438602.ipage.com/About.html'>About</a>

then you can style it using css to look like a button

some example styles might be something like:

.btn {
  display: inline-block;
  padding: 4px 8px;
  background: tomato;
  color: white;
  text-decoration: none;
}
about 4 years ago · Juan Pablo Isaza Report

0

To open a site use either window.open with JavaScript or better still use a link which has an attribute of target="_blank"

Try this:

a {
  background: #aaf;
  border: 1px solid #000;
  border-radius: 3px;
  color: #000;
  padding: 4px;
}
a:hover {
  background: #ddf;
}
a:active {
  background: #aaf;
}
<a href="https://rgulewicz2438602.ipage.com/About.html">About</a>

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!