Does declaring language conflict with declaring the document as html?

Why are we adding a tag now if later we will add a mandatory to tell the browser what language we are going to use.
Adding two opening tags won’t create a conflict?

The entire document rests within the <html></html> set of tags. They represent the root document. The Document Type Declaration points to html as the root. I see no duplication here. Am I not getting your question?

Sorry
When I write the code I always declare the language of the document inside the <head> <html lang="....."> </head>
Seeing at your example I am a bit confusing
What is the best practice?
Thank you

You are evading the topic of your first question, which we did not fully comprehend. Tough to know where we’re going if we don’t know where we are.

2 Likes

I am not trying to evade my initial question,I just didn’t ask you properly due to my poor English.
Anyway back to my question could you please tell me

“Why do we need to add <html> ...</html> to rest our document within now when later we will have to use <html lang="...">...</html> as mandatory?”

Adding two pairs of the same tags would not create a conflict?
What is the best practice?

Thank you

We would not need to add another pair of tags, just include the lang attribute in the opening HTML tag.

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Basic HTML</title>
  </head>
  <body>

  </body>
</html>
1 Like