Validation For Mobile Phone For Regular Web Site

Sitepoint Members,

I was using this tool
mobiReady - dotMobi compliance & mobileOK checker
to see what mobile validation errors I have on my regular XHTML site and have only 2 errors.
The first saying I can’t use “lang” in this line
<html xmlns=“http://www.w3.org/1999/xhtml” xml:lang=“en” lang=“en”>

and the second
“FAIL near line 106 column 8
The content of element type “body” must match (h1|h2|h3|h4|h5|h6|ul|ol|dl|p|div|pre|blockquote|address|hr|table|form|fieldset|script|noscript)+”.
Line 106 is the second to last line of the page (</body>)

Can these be easily fixed, allowing my site to appear on mobile phones? Is the second error a compound error of the first error?

Can I just remove xml:lang=“en” lang=“en” because I have “EN” in the first part of the first line?

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN”

Thanks,

Chris

The lang attribute is tag-soup-HTML, and xml:lang is the correct method when using XML and therefore XHTML

<html xmlns=“http://www.w3.org/1999/xhtml” xml:lang=“en”>

Ren,
I took that out, lang=“en”. I think I had made the mistake of using an seo program for html and put that in. I’ll have to watch out for that - before putting some code in, see what programming language the code is for.

Thanks Ren,

Chris

Ren,

That fixed the one validator error. Anythoughts on what causes this second and last error? my line line 106 they’re referring to is the second to last line of the code for my page: </body>.

“FAIL near line 106 column 8
The content of element type “body” must match (h1|h2|h3|h4|h5|h6|ul|ol|dl|p|div|pre|blockquote|address|hr|table|form|fieldse t|script|noscript)+”.

does it mean only these functions (above) can be used and that I’m using a function not in that list?

My code validates for the most stringent standards in Total Validator’s validator, and W3C’s validator, so I’m sure it’s a phone validation error and not a general error.

Thanks,

Chris

Ren,
I made a little progress. I found this page explaining the error message
Fixit - Valid Markup | mobiForge

It says “Only certain tags are allowed immediately after the <form> tag”. I’m not sure what the <form> tag is. Do you think the mobiready.com validator took my use of the letters f o r m in the word “information” I used on the page in the lines of text I have - some lines of text don’t have <p>…</p> but have …form… .

Thanks,

Chris

This should help me

W3C mobileOK Checker

Thanks