/    Sign up×
Community /Pin to ProfileBookmark

Validation results

Can anybody shed some light on this, please. I just validated a page & got some confusing results.
Here’s the first:

Line 6, column 5: document type does not allow element “HTML” here (explain…).
<html>

Here’s the source code:

<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”
http://www.w3.org/TR/html4/loose.dtd“>

<meta http-equiv=”content-type” content=”text/html; charset=ISO-8859-1″>
<html>
<head>

My best guess here is that if you use a doctype statement that includes “html” the actual <html> tag is not needed.(?)

Second thing I don’t understand:

Line 43, column 162: end tag for element “FONT” which is not open (explain…).
…FONT COLOR=black SIZE=2>”+msg+”</FONT></TD></tr></TABLE>”;

This is repeated for each of the closing tags, including the /table tag. Is this just because those tags aren’t necessary? That can’t be… how can you get away with not closing a table? I expect it has something to do with the javascript, but I’m clueless in that area.
Here is the code:

var content=”<TABLE WIDTH=180 BORDER=1 BORDERCOLOR=red CELLPADDING=2 CELLSPACING=0 “+”BGCOLOR=”+bak+”><tr><TD ALIGN=center><FONT COLOR=black SIZE=2>”+msg+”</FONT></TD></tr></TABLE>”;

TIA for whatever help you can give.

to post a comment
HTML

7 Comments(s)

Copy linkTweet thisAlerts:
@PeOfEoNov 12.2003 — drop the font tag and use css would be my suggestion to #2 and for #1 that meta tag needs to be in your head section, after your html and head tag.
Copy linkTweet thisAlerts:
@Aronya1authorNov 12.2003 — I should've seen the meta tag location. Thanks.

Want to take another look at the second problem? I get the same message for all 4 closing tags.


And, hey, don't you sleep?
Copy linkTweet thisAlerts:
@DaveSWNov 12.2003 — I've seen that problem before, and I think it's all to do with it being in the javascript part. I didn't find a solution last time tho.
Copy linkTweet thisAlerts:
@CharlesNov 12.2003 — [i]Originally posted by DaveSW [/i]

[B]I didn't find a solution last time tho. [/B][/QUOTE]
[font=georgia]1) Put the JavaScript in an external file.

2) Escape the '/' [i]a la[/i] [font=monospace]document.write ('<p>Date:', new Date().toDateString(), '</p>')[/font].[/font]
Copy linkTweet thisAlerts:
@Aronya1authorNov 12.2003 — [i]Originally posted by Aronya1 [/i]

[B]I expect it has something to do with the javascript, but I'm clueless in that area.[/B][/QUOTE]

Key phrase: "I'm clueless in that area." Thanks Charles, for the suggestions. I understand what you mean in #1, even if I might not know how to accomplish it. But #2 is just Greek. I'm going to try changing the table to a div & see what happens.
Copy linkTweet thisAlerts:
@DaveSWNov 13.2003 — I think all he means is when you have a / - as in </p> then you need to put a in front of it to hide it. E.g </table> becomes </table>
Copy linkTweet thisAlerts:
@Aronya1authorNov 13.2003 — Thanks for that, Dave. I'll try it & see what happens.
×

Success!

Help @Aronya1 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.25,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...