Skip to content
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

Merged
merged 1 commit into from
Apr 3, 2024
Merged

Update html.md #136

merged 1 commit into from
Apr 3, 2024

Conversation

joedolson
Copy link
Contributor

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.

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.
@dmsnell
Copy link

dmsnell commented Apr 3, 2024

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 .xml a browser will interpret as HTML5 any document claiming to be XHTML.

@aaronjorbin
Copy link
Member

LGTM

@dingo-d dingo-d merged commit c7da122 into WordPress:master Apr 3, 2024
@joedolson joedolson deleted the patch-1 branch April 3, 2024 19:34
Incorrect:

```html
<input type="text" name="email" disabled="true" />
Copy link

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>
Copy link
Contributor Author

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

Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants