Challenge - 5 Problems
Metadata Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ component_behavior
intermediate2:00remaining
What is the page title rendered by this Next.js static metadata?
Given this Next.js page component with static metadata, what will be the page title shown in the browser tab?
NextJS
export const metadata = { title: 'Welcome to My Site', description: 'A simple Next.js app' }; export default function Page() { return <main><h1>Hello World</h1></main>; }
Attempts:
2 left
💡 Hint
Look at the metadata object and see which property sets the page title.
✗ Incorrect
The 'title' property inside the static metadata object sets the page title shown in the browser tab.
📝 Syntax
intermediate2:00remaining
Which option correctly defines static metadata in a Next.js page?
Choose the correct syntax to define static metadata for a Next.js page component.
Attempts:
2 left
💡 Hint
Static metadata must be exported as a constant object, not a function or default export.
✗ Incorrect
Next.js expects static metadata as a named export constant object called 'metadata'.
❓ state_output
advanced2:00remaining
What is the description meta tag content rendered by this static metadata?
Given this static metadata in a Next.js page, what will be the content of the description meta tag in the HTML?
NextJS
export const metadata = { title: 'About Us', description: 'Learn more about our company and team.' }; export default function About() { return <main><h1>About</h1></main>; }
Attempts:
2 left
💡 Hint
The 'description' property in metadata sets the meta description tag content.
✗ Incorrect
The 'description' property in the static metadata object sets the content of the meta description tag in the HTML head.
🔧 Debug
advanced2:00remaining
Why does this static metadata not update the page title?
This Next.js page has static metadata but the browser tab title remains 'Document'. What is the likely cause?
NextJS
const metadata = { title: 'Dashboard' }; export default function Dashboard() { return <main><h1>Dashboard</h1></main>; }
Attempts:
2 left
💡 Hint
Check if the metadata object is properly exported for Next.js to detect it.
✗ Incorrect
Next.js requires the metadata object to be exported with 'export const metadata' to apply it.
🧠 Conceptual
expert2:00remaining
Which statement about Next.js static metadata is TRUE?
Select the true statement about how static metadata works in Next.js 14+.
Attempts:
2 left
💡 Hint
Think about when static metadata is processed and how it affects the HTML.
✗ Incorrect
Static metadata is a named export object used by Next.js at build time to generate head tags, not changed dynamically.