htmlAttributes
TypeScript: object | (pageContext) => object
Environment: server
Cumulative: true
Global: true
Provided by: vike-react
/vike-vue
/vike-solid
You need to install
vike-react
/vike-vue
/vike-solid
to be able to use this setting.
The htmlAttributes
setting adds attributes to the <html>
tag.
// pages/+config.js
export default {
// <html class="dark">
htmlAttributes: { class: 'dark' }
}
See lang
if you merely want to set the <html lang>
attribute.