-
-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTML validation - Incorrect wrap of button #42
Comments
One way to avoid this problem would be to favor the use of strong instead of button. Like this:
The fact is that a link to which we assign a button visual is often the case in order to emphasize its importance in a page. The strong tag responds in this sense better than the button tag. In terms of design, this is justified. |
For the record, the code example on the website is <a href="https://example.com">
<button>Click me!</button>
</a> The HTML Standard states this for the content model of
https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-a-element
|
Old issue, I know, but this always irritated me as well. I guess the proper way to do a “link button” would be to simply wrap the button in a <form action="https://example.com" method="get">
<button type="submit">Go to Example</button>
</form> It’s not that much more verbose than having a |
From the demo page: https://newcss.net/usage/elements/
The instructions for a link button:
Click me!A "button" can't be wrapped in an anchor element.
This use doesn't pass HTML validators.
The text was updated successfully, but these errors were encountered: