SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Guru
    Join Date
    Jan 2010
    Posts
    635
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    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

  2. #2
    SitePoint Wizard Ren's Avatar
    Join Date
    Aug 2003
    Location
    UK
    Posts
    1,060
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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">

  3. #3
    SitePoint Guru
    Join Date
    Jan 2010
    Posts
    635
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    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

  4. #4
    SitePoint Guru
    Join Date
    Jan 2010
    Posts
    635
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    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

  5. #5
    SitePoint Guru
    Join Date
    Jan 2010
    Posts
    635
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    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 &lt;form&gt; tag". I'm not sure what the &lt;form&gt; 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

  6. #6
    SitePoint Guru
    Join Date
    Jan 2010
    Posts
    635
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    This should help me

    W3C mobileOK Checker

    Thanks


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •