2021-12-31 06:09:44 +01:00
# No Head Element
2022-06-14 04:17:42 +02:00
> Prevent usage of `<head>` element.
2021-12-31 06:09:44 +01:00
### Why This Error Occurred
2022-06-14 04:17:42 +02:00
A `<head>` element was used to include page-level metadata, but this can cause unexpected behavior in a Next.js application. Use Next.js' built-in `next/head` component instead.
2021-12-31 06:09:44 +01:00
### Possible Ways to Fix It
Import and use the `<Head />` component:
```jsx
import Head from 'next/head'
function Index() {
return (
< >
< Head >
< title > My page title< / title >
< meta name = "viewport" content = "initial-scale=1.0, width=device-width" / >
< / Head >
< />
)
}
export default Index
```
### Useful Links
- [next/head ](https://nextjs.org/docs/api-reference/next/head )