+htmlAttributes

type Value = Record<string, string>
type HtmlAttributes = Value | ((pageContext) => Value)


vike-react
/vike-vue
/vike-solid
You need
vike-react
/vike-vue
/vike-solid
to be able to use this setting.
The htmlAttributes
setting adds attributes to the <html>
tag.
// pages/+config.ts
import type { Config } from 'vike/types'
export default {
// <html class="dark">
htmlAttributes: { class: 'dark' }
} satisfies Config
See lang
if you merely want to set the <html lang>
attribute.