Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9100971
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T01:00:00+00:00 2026-06-17T01:00:00+00:00

Is it incorrect to use the html <button> tag when designing a UI rather

  • 0

Is it incorrect to use the html <button> tag when designing a UI rather than using <div class="button">? In implementation I haven’t noticed a difference between both approaches, and <button> seems more semantic, but I am not sure if it is only intended for usage within a form. The button would not be in a form. Using the <div> tag seems to be the most common way of making buttons (bootstrap) but I am not sure why. Are there any technical reasons for this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T01:00:01+00:00Added an answer on June 17, 2026 at 1:00 am

    It’s better to use <button> rather than <div> or any other element to represent a button. The “type” attribute is important here and should be type="button", without it the default value is submit which doesn’t make sense outside of a form.

    And yeah by the way, having a <button> outside of a form is perfectly fine.

    Often times while designing a UI, the <a> tag is the most appropriate element where it makes sense, but <button> is perfectly fine (and really, intended) for performing an action via javascript.

    Using the <div> tag seems to be the most common way of making buttons (bootstrap) but I am not sure why.

    I really haven’t seen evidence of this, and to be honest it doesn’t matter what they do. The bootstrap framework tends to disregard semantics, for example though the use of empty elements just for presentational reasons like <li class="divider"></li>.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I tried to make one exam using html forms which would find the incorrect
I have the following html: <div> <input type=text maxlength=2 class=day-spin-month></input> <span>/</span> <input type=text maxlength=2
I'm trying to use this trie implementation for ocaml: http://www.lri.fr/~filliatr/ftp/ocaml/ds/trie.ml.html This is my implementation
Possible Duplicate: Why does this intentionally incorrect use of strcpy not fail horribly? Below
Error display as Incorrect syntax near '@Cmp_DocPath', if i use comment Line code I
In my code here, I have a CSS class called active which I use
I am having an issue applying css dynamically to a loaded div using the
I'm either using incorrect syntax or going about this with the wrong method. In
I need to fetch HTML from Turkish webpages using Java. However, I am finding
I'm creating a printer class that will need to print both HTML strings and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.