"Stray start tag footer" in html validator?
50,271
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.
Author by
Hayley van Waas
Updated on July 20, 2022Comments
-
Hayley van Waas almost 2 years
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?