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

318
Views
Why is there a difference between the results using <button type> and <button id> in HTML/CSS even if I'm using the same variable?

I am doing a learn Javascript for beginners course on Scrimba. We have to create a button. Two different implementations, one using <button type> and the other using <button id> are giving different results. I am unable to understand what the difference is between type and id. Please help?

Implementation 1 by the tutorial-

<button id="increment-btn">INCREMENT</button>

This gives a red button 1

Implementation 2 by me-

<button type="increment-btn">INCREMENT</button>

This gives a grey button 2

What's the difference between the way they work?

Thanks!

about 4 years ago · Juan Pablo Isaza
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!