Martin Joe Martin Joe - 6 days ago 6
HTML Question

How to properly use lang in HTML

I want to ask you how to properly use lang in HTML code.
Im trying to have website in 2 langs en, pl.

<html lang="en">
<html lang="pl">

Is this way correct?


You can't have two <html> tags in the same document. You should use one <html> tag without the lang attribute and use the lang attribute on tags that contain only one language. Here is an example:

    <!--some elements in the head-->
    <p lang="en">This is text</p>
    <p lang="fr">Ceci est du texte</p>