Results 1 to 3 of 3

Thread: HTML validation question

  1. #1
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    1,712
    Thanks
    82
    Thanked 90 Times in 88 Posts

    Default HTML validation question

    Hi,

    I am having trouble getting a page to HTML validate. In particular it says I have a lot of extra closing span tags. The lines look like this:

    Code:
    <span class=\'a8\'>Grace for the guilty </span><span class=\'a3\'>Q</span><span class=\'a8\'> Rest for the weary</span>
    but supposedly there should be no closing tags used here. The page is here and the validation page is here.
    Last edited by james438; 02-25-2012 at 06:26 AM. Reason: fixed the colors of the links in the post.
    To choose the lesser of two evils is still to choose evil. My personal site

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,951
    Thanks
    43
    Thanked 3,194 Times in 3,157 Posts
    Blog Entries
    12

    Default

    You could ignore it as the validator is looking inside the script where it has no real business looking.

    Or you can make the script external (preferred).

    Or you could escape the / slashes in the closing </span> tags inside the script. Replacing:

    Code:
    fader[2].msg[0] = "<span class=\'a8\'>Grace for the guilty </span><span class=\'a3\'>Q</span><span class=\'a8\'> Rest for the weary</span>";
    fader[2].msg[1] = "<span class=\'a2\'>My grace is sufficient for you, for my power is made perfect in weakness. (2 Corinthians 12:9)</span>";
    fader[2].msg[2] = "<span class=\'a8\'>Grace for the guilty </span><span class=\'a3\'>Q</span><span class=\'a8\'> Rest for the weary</span>";
    with:

    Code:
    fader[2].msg[0] = "<span class=\'a8\'>Grace for the guilty <\/span><span class=\'a3\'>Q<\/span><span class=\'a8\'> Rest for the weary<\/span>";
    fader[2].msg[1] = "<span class=\'a2\'>My grace is sufficient for you, for my power is made perfect in weakness. (2 Corinthians 12:9)<\/span>";
    fader[2].msg[2] = "<span class=\'a8\'>Grace for the guilty <\/span><span class=\'a3\'>Q<\/span><span class=\'a8\'> Rest for the weary<\/span>";
    That's replacing all </span> tags in the script code with <\/span>.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    james438 (02-25-2012)

  4. #3
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    1,712
    Thanks
    82
    Thanked 90 Times in 88 Posts

    Default

    Awesome, thanks. I shall endeavor to do all three of your suggestions.
    To choose the lesser of two evils is still to choose evil. My personal site

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
  •