News for hackers. Stuff that matters.
Re:The unreasonable effectiveness of simple HTML by trissylegs on Thursday January 28, 2021 @12:14AM (#25938476)
> Very few people have the skill to turn a div into an effective button, yet over and over I see web sites with rows of buttons which are in fact just divs with javascript behind them.

Gahhh. I use either an <a> or a <button> and put style on it. Has all the same visual appeal of the equivalent div. But it already is a button.

Re:The unreasonable effectiveness of simple HTML by DCoder on Thursday January 28, 2021 @12:59AM (#25938741)
> use either an <a> or a <button>

Generally, it should be noted that an <a> tag is only appropriate if it makes sense to right-click this element and get options to "open in new tab" or "add to bookmarks". All the stupid "buttons" implemented as <a href="#"> + e.preventDefault() need to die.

Re:The unreasonable effectiveness of simple HTML by trissylegs on Sunday January 31, 2021 @10:39PM (#25985276)
Yea I use <a> if it's a navigation button for react-router. But it still shows up like a URL because we're using the Browser history (it just updates the URL and renders the new page, each route has a URL and resource id's are in the url). As opening the URL directly should work (if authenticated) it makes sense to use <a> tags.