PDA

View Full Version : Resolved HTML validation question



james438
02-25-2012, 05:31 AM
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:


<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 (http://www.sovgraceopc.org/calendar.php) and the validation page is here (http://validator.w3.org/check?uri=http%3A%2F%2Fwww.sovgraceopc.org%2Fcalendar.php&charset=%28detect+automatically%29&doctype=Inline&ss=1&group=0&user-agent=W3C_Validator%2F1.2).

jscheuer1
02-25-2012, 06:21 AM
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:


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:


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>.

james438
02-25-2012, 07:26 AM
Awesome, thanks. I shall endeavor to do all three of your suggestions.