Skip to content

Add main tag to HTML structure#11322

Open
jingeno wants to merge 1 commit intoMicrosoftDocs:mainfrom
jingeno:patch-1
Open

Add main tag to HTML structure#11322
jingeno wants to merge 1 commit intoMicrosoftDocs:mainfrom
jingeno:patch-1

Conversation

@jingeno
Copy link
Copy Markdown

@jingeno jingeno commented Apr 25, 2026

Won't render with main tag

Won't render with main tag
@prmerger-automator
Copy link
Copy Markdown
Contributor

@jingeno : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change.

@jingeno
Copy link
Copy Markdown
Author

jingeno commented Apr 25, 2026

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-service-prod
Copy link
Copy Markdown
Contributor

Learn Build status updates of commit cf07251:

✅ Validation status: passed

File Status Preview URL Details
docs/javascript/create-react-app.md ✅Succeeded

For more details, please refer to the build report.

@ttorble ttorble requested a review from Copilot April 27, 2026 14:49
@ttorble
Copy link
Copy Markdown
Contributor

ttorble commented Apr 27, 2026

@Mikejo5000

Can you review the proposed changes?

IMPORTANT: When the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge.

#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

@prmerger-automator prmerger-automator Bot added the aq-pr-triaged tracking label for the PR review team label Apr 27, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 the index.html code sample so document.querySelector('main') resolves to a real mount target.

<script type="module" defer src="/src/main.jsx"></script>
</head>
<body>
<main></main>
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
<main></main>
<main></main>

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants