Add main tag to HTML structure#11322
Conversation
Won't render with main tag
|
@jingeno : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change. |
|
Also, the official repo for this React sample does have the main tag in index.html but it is missing from the tutorial documentation: https://github.com/sayedihashimi/todojswebapp/blob/main/todowebapp/index.html |
|
Learn Build status updates of commit cf07251: ✅ Validation status: passed
For more details, please refer to the build report. |
|
Can you review the proposed changes? IMPORTANT: When the changes are ready for publication, adding a #label:"aq-pr-triaged" |
There was a problem hiding this comment.
Pull request overview
Fixes the React/Vite tutorial HTML snippet so the app can mount correctly when main.jsx renders into a <main> element.
Changes:
- Adds a
<main>element to theindex.htmlcode sample sodocument.querySelector('main')resolves to a real mount target.
| <script type="module" defer src="/src/main.jsx"></script> | ||
| </head> | ||
| <body> | ||
| <main></main> |
There was a problem hiding this comment.
In this HTML sample, the <main> line is indented differently than the surrounding <head>/<body> contents. Align the indentation with the rest of the snippet so readers who copy/paste get a consistently formatted index.html.
| <main></main> | |
| <main></main> |
Won't render with main tag