The following _site.yml creates a website with an <html> tag that does not specify a language. (Accessibility checkers will throw a complaint about this.)
name: "My Website!"
output_dir: "docs"
include: [".nojekyll"]
output:
html_document:
lang: en
css: style.css
include:
in_header: header.html
after_body: footer.html
If within an individual .Rmd file a language is specified in the YAML, the correct HTML is created.
For example, within the .Rmd you use:
---
title: "Title of Page"
author: "Cool R Markdown User"
lang: en
---
The rendered document then contains: <html lang="en" xml:lang="en">
Is this a feature, or a bug? (Perhaps it's good practice to specify a language for each page specifically.)