# Incorrect site language tag in HTML code

**URL:** <https://forums.realmacsoftware.com/t/incorrect-site-language-tag-in-html-code/31215>\
**Category:** RapidWeaver Classic\
**Created:** [February 16, 2020, 7:03pm UTC](https://forums.realmacsoftware.com/t/incorrect-site-language-tag-in-html-code/31215 "2020-02-16T19:03:41Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![MagicNeico](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/magicneico/32/16431_2.png) [@MagicNeico](https://forums.realmacsoftware.com/u/MagicNeico)\
**Post date:** [February 16, 2020, 7:03pm UTC](https://forums.realmacsoftware.com/t/incorrect-site-language-tag-in-html-code/31215/1 "2020-02-16T19:03:41Z")

</div>

Hello! I am using Foundry to build a German website. The Site Language option in RW is set to German. However, when exported, the html start tag has lang=“en”. I am worried that Google will interpret my site incorrectly.

1. `<!DOCTYPE html>` `↩`
2. `<html lang="en">` `↩`
3. `` `↩`
4. `<head>` `↩`

It should be: 2. `<html lang="de">` `↩`

Does someone know where I can fix this? Thanks!

---

<div class="post-metadata">

**Author:** ![teefers](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/teefers/32/8173_2.png) [@teefers](https://forums.realmacsoftware.com/u/teefers)\
**Post date:** [February 16, 2020, 7:32pm UTC](https://forums.realmacsoftware.com/t/incorrect-site-language-tag-in-html-code/31215/2 "2020-02-16T19:32:39Z")

</div>

Try the Foundry Control Center Stack (the one required on each page).

At the bottom under advanced:  
 ![2020-02-16_12-31-09](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/3X/9/3/9393de148b8d62b2eba907c16e535c3455695129.jpeg)

---

<div class="post-metadata">

**Author:** ![MagicNeico](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/magicneico/32/16431_2.png) [@MagicNeico](https://forums.realmacsoftware.com/u/MagicNeico)\
**Post date:** [February 16, 2020, 7:40pm UTC](https://forums.realmacsoftware.com/t/incorrect-site-language-tag-in-html-code/31215/3 "2020-02-16T19:40:10Z")

</div>

Well, I didn’t know this option exists. Thanks for pointing me in the right direction. However, after checking, it is set to German already. I changed the language to a different one, saved the project, and changed it back to German and republished. The analysis tool returned: “This document appears to be written in German but the `html` start tag has `lang="en"` . Consider using `lang="de"` (or variant) instead.”

Any suggestions?

---

<div class="post-metadata">

**Author:** ![teefers](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/teefers/32/8173_2.png) [@teefers](https://forums.realmacsoftware.com/u/teefers)\
**Post date:** [February 16, 2020, 7:48pm UTC](https://forums.realmacsoftware.com/t/incorrect-site-language-tag-in-html-code/31215/4 "2020-02-16T19:48:11Z")

</div>

Don’t know what tool you are using to analyze?  
I just did a quick test and the HTMl lang tag seems to change fine:

 ![2020-02-16_12-46-09](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/3X/c/1/c1b455ceea9b54919700067be58524b49ce62569.jpeg)

Perhaps the tool you are using is getting something from Cache?

Do you have a URL for us to have a look?

---

<div class="post-metadata">

**Author:** ![MagicNeico](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/magicneico/32/16431_2.png) [@MagicNeico](https://forums.realmacsoftware.com/u/MagicNeico)\
**Post date:** [February 16, 2020, 8:04pm UTC](https://forums.realmacsoftware.com/t/incorrect-site-language-tag-in-html-code/31215/5 "2020-02-16T20:04:28Z")

</div>

Yes, the tool I am using is [Ready to check - Nu Html Checker](https://validator.w3.org/nu/) and my site: [https://nicolasdesign.de](https://nicolasdesign.de) .  
I did the page inspect and it’s showing “DE”. Yeah!!!

![language%20tag](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/3X/7/e/7e8d6f22cefd8f54091f822383ca14fd51a01745.png)

When I run my site using this tool I get over 70 errors and warnings within the code.

---

<div class="post-metadata">

**Author:** ![swilliam](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/swilliam/32/14799_2.png) [@swilliam](https://forums.realmacsoftware.com/u/swilliam)\
**Post date:** [February 16, 2020, 8:12pm UTC](https://forums.realmacsoftware.com/t/incorrect-site-language-tag-in-html-code/31215/6 "2020-02-16T20:12:21Z")

</div>

IMO, Most of those free online tools are sh!t. Run [Google.com](http://Google.com) on it and see what it says.

---

<div class="post-metadata">

**Author:** ![teefers](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/teefers/32/8173_2.png) [@teefers](https://forums.realmacsoftware.com/u/teefers)\
**Post date:** [February 16, 2020, 8:14pm UTC](https://forums.realmacsoftware.com/t/incorrect-site-language-tag-in-html-code/31215/7 "2020-02-16T20:14:37Z")

</div>

There is only one lang tag on your live page:

 ![2020-02-16_13-10-26](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/3X/5/d/5dbf5121e306a936b5fc4a119142e1125a9a875a.jpeg)

---

<div class="post-metadata">

**Author:** ![MagicNeico](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/magicneico/32/16431_2.png) [@MagicNeico](https://forums.realmacsoftware.com/u/MagicNeico)\
**Post date:** [February 16, 2020, 8:18pm UTC](https://forums.realmacsoftware.com/t/incorrect-site-language-tag-in-html-code/31215/8 "2020-02-16T20:18:08Z")

</div>

Thank you Doug (and Scott). Seems like the analysis tool is indeed sh!t and doesn’t say the truth. Phew!  
Happy Sunday to you both and thanks again for looking into this for me. Cheers from Germany.

---

<div class="post-metadata">

**Author:** ![MagicNeico](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/magicneico/32/16431_2.png) [@MagicNeico](https://forums.realmacsoftware.com/u/MagicNeico)\
**Post date:** [February 16, 2020, 8:30pm UTC](https://forums.realmacsoftware.com/t/incorrect-site-language-tag-in-html-code/31215/9 "2020-02-16T20:30:56Z")

</div>

I noticed that when checking the page inspect on the Safari browser that there are multiple tabs. Under the first tab Elements, the HTML code says “DE” in the language tag. However under the Resources tab it shows the “EN” language tag at the top of the code. I believe this is where the analysis tool has the data from. I am confused now. Which code is the one that google reads?

![HTML%20code](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/3X/8/3/831d604dbd34ba4c2df605eeaa5602fd6f9ee3ab.png)

---

<div class="post-metadata">

**Author:** ![teefers](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/teefers/32/8173_2.png) [@teefers](https://forums.realmacsoftware.com/u/teefers)\
**Post date:** [February 16, 2020, 8:42pm UTC](https://forums.realmacsoftware.com/t/incorrect-site-language-tag-in-html-code/31215/10 "2020-02-16T20:42:58Z")

</div>

A chrome browser will read what’s in the DOM (elements tab).

As you can see this Chrome browser is asking me if I want to translate German to English(your page) ![2020-02-16_13-39-36](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/3X/0/a/0a43095dfd13d247f62a771b5448402b99134fc0.jpeg) :

---

<div class="post-metadata">

**Author:** ![MagicNeico](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/magicneico/32/16431_2.png) [@MagicNeico](https://forums.realmacsoftware.com/u/MagicNeico)\
**Post date:** [February 16, 2020, 9:00pm UTC](https://forums.realmacsoftware.com/t/incorrect-site-language-tag-in-html-code/31215/11 "2020-02-16T21:00:29Z")

</div>

Thanks Doug. I am happy now!

Apropos DOM (I know I am going off track now, sorry), do you know if there is anywhere a best practice RW document how to build sites with the number of DOMs in mind. I feel that my sites have too many DOMs which causes longer loading times etc. I am sure I can reduced the DOMs by building my sites a little differently, but don’t know how. Thank you so much.

---

<div class="post-metadata">

**Author:** ![teefers](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/teefers/32/8173_2.png) [@teefers](https://forums.realmacsoftware.com/u/teefers)\
**Post date:** [February 16, 2020, 9:23pm UTC](https://forums.realmacsoftware.com/t/incorrect-site-language-tag-in-html-code/31215/12 "2020-02-16T21:23:45Z")

</div>

The [DOM (Document Object Model)](https://en.wikipedia.org/wiki/Document_Object_Model) is built for every page on a site. It is basically a tree structure that styling(CSS) and JavaScript gets applied too.

The browser builds the DOM tree for every page (and an Accessibility tree as well).

The reason that the lang tag is showing as EN in the source, but not the DOM is it was probably changed with JavaScript by Foundry.

As for load times, it’s more about what’s on a page. Videos are hogs, images next.

---

<div class="post-metadata">

**Author:** ![MagicNeico](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/magicneico/32/16431_2.png) [@MagicNeico](https://forums.realmacsoftware.com/u/MagicNeico)\
**Post date:** [February 16, 2020, 9:32pm UTC](https://forums.realmacsoftware.com/t/incorrect-site-language-tag-in-html-code/31215/13 "2020-02-16T21:32:36Z")

</div>

The concerning message about my DOM comes from Google’s Speed test site ([https://developers.google.com/speed/pagespeed/insights/](https://developers.google.com/speed/pagespeed/insights/)). It says about my page “Avoid an excessive DOM size 1,399 elements”. I noticed that the more stack items I add to my page, of course the larger the list of DOM elements gets. I was wondering if there is a smarter way of working with Stacks to minimize the number of elements in my DOM - without reducing all the styles and margins etc. I need to make my pages look good.

---

<div class="post-metadata">

**Author:** ![teefers](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/teefers/32/8173_2.png) [@teefers](https://forums.realmacsoftware.com/u/teefers)\
**Post date:** [February 16, 2020, 9:50pm UTC](https://forums.realmacsoftware.com/t/incorrect-site-language-tag-in-html-code/31215/14 "2020-02-16T21:50:00Z")

</div>

The only way to reduce the number of DOM elements on a page is to reduce the number of items on the page.

Most conventional stacks wrap each item with two additional `<div>`'s (`stacks_out`, `stacks_in`). So adding a single element like a header can create 3 DOM elements.

Although these additional elements can make it more challenging to navigate the DOM(screen Readers, Crawlers, etc.), they really shouldn’t impact load time by much. They are just text.

The only thing that you can do from an RW user side is to make sure you need to put a stack inside another stack. I see this a lot with some sites. Folks will put a stack inside another, inside another stack, inside another stack, etc. When perhaps they could eliminate some of that by changing the settings on one or more of the parent stacks.

---

<div class="post-metadata">

**Author:** ![MagicNeico](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/magicneico/32/16431_2.png) [@MagicNeico](https://forums.realmacsoftware.com/u/MagicNeico)\
**Post date:** [February 16, 2020, 9:54pm UTC](https://forums.realmacsoftware.com/t/incorrect-site-language-tag-in-html-code/31215/15 "2020-02-16T21:54:25Z")

</div>

That’s exactly what I do…putting a stack inside another stack, inside another stack, inside another stack, etc. I should get more familiar with the various settings of each stack to eliminate this practice. Doug, you’ve been very helpful today! You are my Sunday Hero! Take care my RW friend.

---

<div class="post-metadata">

**Author:** ![Elixir](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/elixir/32/25498_2.png) [@Elixir](https://forums.realmacsoftware.com/u/Elixir)\
**Post date:** [February 16, 2020, 10:12pm UTC](https://forums.realmacsoftware.com/t/incorrect-site-language-tag-in-html-code/31215/16 "2020-02-16T22:12:50Z")

</div>

You’re running your site through a tool that expects that you’re hand coding the page and optimizing each little thing by hand. But you’re using a tool that is multi-purpose and has to meet _lots_ of needs, and also has lots of different elements that can all be nested.

Honest opinion here – just create good content for your site and ignore those validators. Compress your images before putting them into RW, write good copy and you’ll be fine. You’ll also eliminate your need for a trip to the doctor over an unnecessary ulcer. 🤪🤣

---

<div class="post-metadata">

**Author:** ![MagicNeico](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/magicneico/32/16431_2.png) [@MagicNeico](https://forums.realmacsoftware.com/u/MagicNeico)\
**Post date:** [February 16, 2020, 10:16pm UTC](https://forums.realmacsoftware.com/t/incorrect-site-language-tag-in-html-code/31215/17 "2020-02-16T22:16:51Z")

</div>

Hey Adam!! You see I am following your advise. 😃 This platform is a great resource and I received great help already. 😃 With the types of questions I ask, I just want to get the most out of RW and do things the way they should be done. Got my first client now and want to be prepared if things don’t go as planned. Trying to build a safety net if you will.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/system/32/25301_2.png) [@system](https://forums.realmacsoftware.com/u/system)\
**Post date:** [March 18, 2020, 8:16am UTC](https://forums.realmacsoftware.com/t/incorrect-site-language-tag-in-html-code/31215/18 "2020-03-18T08:16:55Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
