I am trying to check if my html is a well formed xml as well but I am keep getting this error on the body tag,
XML Parsing Error: junk after document element
Location: location/index.xml
Line Number 10, Column 1:
<body>
^
And here is the code,
<!DOCTYPE html>
<head>
<meta charset="UTF-8" />
<title></title>
<link href="style/style.css" rel="stylesheet" type="text/css"/>
<link rel="icon" href="images/favicon.ico" />
</head>
<body>
<main>
<header>
</header>
<nav >
</nav>
<article>
</article>
</main>
<div class="push"></div>
<footer>
</footer>
</body>
</html>
Whhy am I getting this error ?
You forgot to start with an html
tag. The head
element is taken as a root element and there is a junk (body
) after this root element (just children, not siblings of root are allowed).
<!DOCTYPE html>
<html> <!-- here -->
<head>
<meta charset="UTF-8" />
<title></title>
<link href="style/style.css" rel="stylesheet" type="text/css"/>
<link rel="icon" href="images/favicon.ico" />
</head>
<body>
<main>
<header>
</header>
<nav >
</nav>
<article>
</article>
</main>
<div class="push"></div>
<footer>
</footer>
</body>
</html>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With