HTML error: "There are Multiple root Elements"

Asked

Viewed 192 times

1

I’m uploading a project to VTEX, but when uploading, it accuses a multiple element error:

There are Multiple root Elements. Line 3, position 6.

All the examples I saw didn’t suit me, someone can help me?

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:vtex="http://www.vtex.com.br/2009/vtex-common" xmlns:vtex.cmc="http://www.vtex.com.br/2009/vtex-commerce" lang="pt-br"/>
  <head>
    <title>Teste</title>
    <link type="text/css" rel="stylesheet" media="screen" href="css/layout.css" /> <!-- CSS das div's -->
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <!-- Biblioetca JQuery -->             
  </head>
</html>
Show 2 more comments

1 answer

2

Your tag <html> (Line 2) is closed. Since it should be the root tag of your HTML, each tag after it is treated as another tag with the same hierarchical level as it. Hence the message "Multiple root Elements".

To correct, change the /> for > so as to open it so that the </html> at the end of the file to close, forming a single root element.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.