- This topic is empty.
-
AuthorPosts
-
August 18, 2009 at 4:52 am #25725jchap59Participant
Hi,
Trying to embed a google map into a web site and keep getting a validation error from the W3C checker
Line 64, Column 50: document type does not allow element "body" here
<body onload="initialize()" onunload="GUnload()"/>
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).
I think I have follwed the Google instructions and the problem is certainly with the position of the ‘onload’ statement at line 64. HTML code below
Code:1.
3.
4.
5.
6.
7.Google Maps JavaScript API Example
8. 9.
11.
26.38.
39.44.
45.
46.47.48.Summer Lodge
49.
Luxury Bed & Breakfast in East Devon
50.
51.
52.-
53.
- Welcome
- About Us
- Rooms & Tariff
- Activities & Locality
- Guest Comments
- How To Find Us
- Contact Us
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.64.
65.66.
67.
68.
69.
Summer Lodge
70. Dalwood, Axminster, East Devon, EX13 7HW.71.
72.
73.
74.
75.Probably my lack of experience – any help to resolve gratefully accpeted (web page works OK ?)
John C
August 18, 2009 at 8:19 am #62375jchap59ParticipantGreg,
Thanks for the reply – yes, conflict was in having 2 body entries – have moved the onload statement up to the top body entry and it now validates.
Thanks for your help
John C
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.