5 ms·
For the button wrapped in a link example [0], which is invalid HTML, many people don't know it's valid to wrap a button inside a form, using the form's action a
by antibland 7y ago
For the button wrapped in a link example [0], which is invalid HTML, many people don't know it's valid to wrap a button inside a form, using the form's action as the destination. Not something I use often, but it's at least a thing worth knowing.
<form action="link.html" method="get" target="_blank">
<button type="submit">Link</button>
</form>
[0] https://www.htmhell.dev/4-link-also-button/ https://www.htmhell.dev/4-link-also-button/
- tabtab 7y agoI find that different browser brands react differently putting BUTTON tags inside of forms. Tread with caution. Internet Explorer versions are usually the biggest bottlenecks.