Forum Moderators: open

Message Too Old, No Replies

DOCTYPE error?

DOCTYPE error?

         

sderenzi

3:39 pm on Mar 27, 2004 (gmt 0)



Hi, I have TidyGUI. I used it to check my source and it has done me great favors. Found errors I didn't know existed. There is one thing I'm confused about. I have used it to check all my other .htm files and it gives the green light. But on the index.htm file it tells me the DOCTYPE doesn't match the content. I don't know why when I use the same DOCTYPE for everything else the index.htm has a problem. Below you can see my source:

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

<html lang="en">
<head><title>example.com</title>

<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<meta http-equiv="content-style-type" content="text/css">
<meta http-equiv="content-language" content="en-gb">
<meta name="description" content="Anime Corporations Emulation Hacking Health, Martial Arts Microsoft Origami Parascience Search Engines Shopping Software Other About Books Daisy (my cat) Essays Philosophy Poems Short Stories Credits">
<meta name="keywords" content="Anime Corporations Emulation Hacking Health Martial Arts Microsoft Origami Parascience Search Engines Shopping Software Other About Books Daisy (my cat) Essays Philosophy Poems Short Stories Credits">

</head>
<frameset cols="20,80" border=0 frameborder="no" framespacing=0>
<frame src="me.htm" name="Menu" scrolling="yes" noresize>
<frame src="ne.htm" name="Content">
</frameset><noframes></noframes>
</html>

Any ideas?

<use example.com in posts, not your real domain - see TOS [webmasterworld.com]>

[edited by: tedster at 4:21 pm (utc) on Mar. 27, 2004]

grahamstewart

3:49 pm on Mar 27, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yup. You're using frames on that page - so you need the frameset doctype.

Which looks like this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">

See the w3c list of valid doctypes [w3.org] for more info.

tedster

4:16 pm on Mar 27, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



My apologies. In an earlier thread I gave sderenzi some wrong information about when to use the frameset doctype - I misunderstood the specs, and now I'm going to dig up that earlier thread and apologize there, too.

sderenzi

5:03 pm on Mar 27, 2004 (gmt 0)



Thanks for the help. I wasn't really sure and it was so simple to find out I felt silly.

g1smd

9:18 pm on Mar 28, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



An easy to mistake to make. Don't sweat it.

It probably would not have any major effect in search engines or browsers if you used the wrong one on just that one page. As it is a one line copy and paste job to fix it, then that should be easy.