-
Notifications
You must be signed in to change notification settings - Fork 178
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
Update html.md #136
Update html.md #136
Conversation
The XHTML specification was superseded in 2018, and the HTML specification is now considered the standard of reference. As such, while we can still reference the XHTML specification, there are places where XHTML standards conflict with HTML standards, such as the handling of boolean attributes. We should update the HTML standards to explicitly allow boolean attributes. See https://core.trac.wordpress.org/ticket/60178 for reference.
See also Core-59883. There are multiple places we do awkward things to support content types that WordPress and browsers stopped supporting long ago. Without HTTP headers or a path ending in |
LGTM |
Incorrect: | ||
|
||
```html | ||
<input type="text" name="email" disabled="true" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we may want to also consider that the trailing self-closing flag is also invalid, and remove it from the examples.
<input type="text" name="email" disabled>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The HTML markup syntax does permit self-closing on void elements; see https://www.w3.org/TR/2011/WD-html-markup-20110113/syntax.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, it is a benign error, like most forms of invalid HTML.
for reference, the living HTML spec is at https://html.spec.whatwg.org
The XHTML specification was superseded in 2018, and the HTML specification is now considered the standard of reference.
As such, while we can still reference the XHTML specification, there are places where XHTML standards conflict with HTML standards, such as the handling of boolean attributes. We should update the HTML standards to explicitly allow boolean attributes. See https://core.trac.wordpress.org/ticket/60178 for reference.