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 7693541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T21:06:48+00:00 2026-05-31T21:06:48+00:00

I have seen several places in stackoverflow where folks have elegantly and easily turned

  • 0

I have seen several places in stackoverflow where folks have elegantly and easily turned a p or a div into a “button” with a click event in jQuery in an HTML based website. I implemented something like that successfully. The styling of these elements is easy and flexible. Why use a button for a script-based click event? They are harder, it seems to me, to style and position. Is it simply a matter of personal choice, or is there a best-practices reason to use a button like one would do in, say, WPF or Windows Forms (or, dare I say it, Silverlight)? I use input submit buttons for posting form input, of course, when implementing an ASP.Net MVC project, because the return to the server demands it.

Thanks for your thougths.

  • 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-05-31T21:06:50+00:00Added an answer on May 31, 2026 at 9:06 pm

    I’d suggest using a button or input element to submit, or perform other actions on, a form element (among others) simply because not everyone uses a mouse to navigate, or use, the internet. I haven’t used screen-reader software myself, as yet, but given the popularity of forms on the internet I believe that they’ve developed an adequate user-interface representation for a button.

    They don’t, however, implement (or reliably implement) JavaScript to the same end, or effect, that you might for a visual UI.

    So depending on your use-case, I’d strongly advise sticking with a generic button (or input). Failing that, leave the button in place in the HTML and remove it with JavaScript and transfer functionality to whatever element you’d rather use (if you must).

    I personally can’t see the benefit of using a block-level element as a button, but if it makes sense to you to discard the semantics, and inherent attributes of the button element in favour of a div or p (and presumably custom data-* attributes) that’s your call. But please bear in mind that the internet should be usable for those that use it differently than you or I.

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

Sidebar

Related Questions

I have seen several questions, on Stack Overflow and in other places, asking how
I have seen several places that Class.getClassLoader() returns the ClassLoader used to load that
I have seen this show up several places in code, never with an explanation,
I have seen several questions with people asking about the same problem but none
I have seen several sites where these social share buttons looks perfectly horizontal aligned.
I have seen several apps that make use of a UISplitViewController inside a tab.
I have seen several posts on how to dismiss a dialog by clicking on
I have seen several posts similar to this but none with a strait forward
Where is the TickCount() call? I have seen several threads on the web that
What does the Linux /proc/meminfo Mapped topic mean? I have seen several one-liners that

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.