Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to export static metadata in a Next.js page.
NextJS
export const metadata [1] { title: 'Home Page', description: 'Welcome to the home page' };
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using colon (:) instead of equals (=) after metadata
Using arrow function syntax instead of object assignment
✗ Incorrect
In Next.js, static metadata is exported using export const metadata = { ... }.
2fill in blank
mediumComplete the code to set the page title in static metadata.
NextJS
export const metadata = {
[1]: 'About Us'
}; Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using
header or name instead of titleUsing camelCase like
pageTitle which is not recognized✗ Incorrect
The title property sets the page title in Next.js static metadata.
3fill in blank
hardFix the error in the metadata export syntax.
NextJS
export const metadata = [1] title: 'Blog' };
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using square brackets [] which define arrays
Using parentheses () or angle brackets <> which are invalid here
✗ Incorrect
Metadata must be an object, not an array. Use curly braces {} to define the object.
4fill in blank
hardFill both blanks to define metadata with title and description.
NextJS
export const metadata = {
[1]: 'Contact',
[2]: 'Get in touch with us'
}; Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using
header or subtitle which are not valid metadata keysSwapping the order of title and description keys
✗ Incorrect
The title and description properties define the page title and description in static metadata.
5fill in blank
hardFill all three blanks to export metadata with title, description, and keywords.
NextJS
export const metadata = {
[1]: 'Services',
[2]: 'Our services overview',
[3]: ['web', 'design', 'development']
}; Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using
tags instead of keywordsMixing up the order of properties
✗ Incorrect
Use title, description, and keywords to define static metadata properties for SEO and page info.