I cannot work out why I am getting this error:
Stray start tag footer.
This is the code (I took the content out, this is just the tags)
<!doctype html>
<head>
<title>title</title>
<meta charset="UTF-8">
<meta name="keywords" content="">
<meta name="description" content="">
<meta name="author" content="">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body>
<img src="heading.jpg" width="840" alt="pic">
<!--<div id="container"></div> used ot set width of page -->
<nav>
<div id="columns">
<a href="index.html">Home</a>
<a href="products.html">Products</a>
<a href="gift_ideas.html">Gift Ideas</a>
</div>
<br>
<div id="link">
<a href="link1.html">link1</a>|<a href="link2.html">link2</a>|<a href="link3.html">link 3</a>
</div>
</nav>
<section>
<br>
<div id="homePage">
<h1>Welcome</h1>
<br>
<div id="cart">
<img src>
</div>
</div>
</section>
</body>
<footer>
<br>
<h2>Contact Us</h2>
Email: <a href="[email protected]">[email protected]</a>
<img src>
</footer>
I am sure i have closed every tag, so what is the problem with the footer?
A stray start tag <html> has been found in the document. As this tag defines the start of the whole HTML document, it should appear only once.
Check the document structure to ensure there are no <meta> tags outside the head section. A common cause of this issue is having a duplicated, out of place <head>... </head> section. Ensure that this section appears in its proper place and is the only container for <meta> tags.
As such, “Stray end tag...” means just that an end tag is not allowed in the context where it appears. As the validator's explanation says: “The Validator found an end tag for the above element, but that element is not currently open.
You need to move the </body>
end tag at the very end, because a footer
element must not appear after the body
element but inside it. This follows from the syntax of the root element, the html
element: it contains a head
element and a body
element, nothing more.
The validator says “Stray start tag footer” because the start tag appears in a context where no elements can be started – after the </body>
tag, where only the optional </html>
tag may appear.
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