Reputation: 2835
I'm trying to put Google Analytics in my Mobile web page, but seems like I'm hitting a big problem.
When trying to validate via the W3C Validator, the script tag arount the Google Analytics code is called as invalid.
Line 10, Column 31: element "script" undefined
<script type="text/javascript">
You have used the element named above in your document, but the document type you are >using does not define an element of that name. This error is often caused by:
incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Frameset" document type to get the "" element), by using vendor proprietary extensions such as "" or "" (this is usually fixed by using CSS to achieve the desired effect instead). by using upper-case tags in XHTML (in XHTML attributes and elements must be all lower-case).
I'm in XHTML Mobile 1.0, because that's a mobile Website (so I pretty much can't change from that). Is there a valid way to put in a tag in XHTML Mobile 1.0?
Upvotes: 0
Views: 1047
Reputation: 70115
<script>
tags were added in XHTML Mobile Profile 1.1. The latest is XHTML Mobile Profile 1.2. I wouldn't use XHTML Mobile 1.0 unless you have a good reason.
iPhone, Android, etc. handle HTML5 just fine, by the way.
Upvotes: 2