Hey guys, im making a website with strihttp://www.daniweb.com/forums/newthread.php?do=newthread&f=143ct xhtml design and everytime i upload an image, it just wont validate when i try the w3schools validator.
It keeps giving me an error message: "
1. Error Line 14, Column 36: document type does not allow element "img" here
<img src="banner.jpg" alt="banner"/>
✉
The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).
One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error)."
Even though i think the syntax is right:S
Maybe im tired thats y i cant spot it, but it would be great if someone could let me know whats wrong with it:s
The source code is:
1. <?xml version="1.0" encoding="UTF-8"?>
2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4.
5. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6.
7. <head>
8. <title>Hello</title>
9. </head>
10. <body>
11. </body>
12.
13.
14. <img src="banner.jpg" alt="banner" />
15.
16. </html>