Now 100x Faster

Read the latest from Gatsby CTO Kyle Mathews Re-introducing Gatsby, a Reactive Site Generator

ContactSign Up for Free
Community Plugin
View plugin on GitHub


A Gatsby plugin to easily add HTML attributes like lang or xmlns.


With npm:

npm install --save gatsby-plugin-html-attributes

Or with Yarn:

yarn add gatsby-plugin-html-attributes


In your gatsby-config.js file, load in the plugin along with an object of any <html> attributes you want to add. Example:

module.exports = {
  plugins: [
      resolve: 'gatsby-plugin-html-attributes',
      options: {
        lang: 'en'
© 2022 Gatsby, Inc.