Forum Moderators: open
Line 28, column 22: document type does not allow element "STYLE" here (explain...).
<style type="text/css">
^
Line 153, column 62: document type does not allow element "LINK" here (explain...).
...link rel="stylesheet" type="text/css" href="texmed.css">
Could someone please tell me the correct way to write this?
Thanks
Janine
When I did my web page in front page I put the css links in the head. I didn't change it went I changed the pages to .asp. Here is what the top of the page looks like. I tried to delete things that weren't relevant to the question.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta http-equiv="pragma" content="no-cache">
<meta name="MSSmartTagsPreventParsing" content="TRUE">
<meta name="ProgId" content="FrontPage.Editor.Document">
<link rel="stylesheet" type="text/css" href="_includes/texmed.css">
<style type="text/css">
<!--
/*dk blue links*/
a.bodytt:link {background-color: transparent;color: #003399;text-decoration: underline;font-weight: bold; font-size:80%}
a.bodytt:visited {background-color :transparent;color:#003399;text-decoration: underline;font-weight: bold; font-size:80%}
}
-->
</style>
</head>
<body><!--#include file = "_includes/toptest.inc"--><div align="center">
Thanks Janine
<style type="text/css">
<!--
/*dk blue links*/
a.bodytt:link {background-color: transparent;color: #003399;text-decoration: underline;font-weight: bold; font-size:80%}
a.bodytt:visited {background-color :transparent;color:#003399;text-decoration: underline;font-weight: bold; font-size:80%}
}
-->
</style>
Change to...
<style type="text/css">
/*dk blue links*/
a.bodytt:link {background-color: transparent;color: #003399;text-decoration: underline;font-weight: bold; font-size:80%}
a.bodytt:visited {background-color :transparent;color:#003399;text-decoration: underline;font-weight: bold; font-size:80%}
}
</style>
P.S. My other concern is what is between those lines. There is an error at line 28 and then it jumps to line 153. That is a lot of distance between two tags in the <head></head> section.
Korkus2000 - I don't know what dtd is.
Marek - I don't know.
Claus - I recreated this in a new page and still got the same errors, so yes, it did recreate the error for me.
Choster - I did click on the error message but I don't know what it means. “document type does not allow element ‘FOO’ here; assuming missing ‘BAR’ start-tag’
Similar to the previous error, but more specific: in this case, you have a ‘FOO’ element that is not contained in a ‘BAR’ element when ‘FOO’ is not allowed outside of ‘BAR’. Some of the most common causes of this error are:
pageoneresults - I did what you suggested - no help.
universalis - I left the title tag off because I thought it was irrelevant. I can't find any missing tags.
Here is the webpage. Maybe you can look at the actual source code. <sorry, no example URLs>
Thanks
Janine
[edited by: tedster at 8:09 pm (utc) on July 24, 2003]
You have the same markup in the head and in the body.
<body><link rel="stylesheet" type="text/css" href="_includes/texmed.css">
<style type="text/css">
<!--
/*dk blue links*/
a.bodytt:link {background-color: transparent;color: #003399;text-decoration: underline;font-weight: bold; font-size:80%}
a.bodytt:visited {background-color :transparent;color:#003399;text-decoration: underline;font-weight: bold; font-size:80%}
}
-->
</style>
I would try taking out that code in the body element
WBF
<edit>Oops, hit submit before I was done responding<edit>
[edited by: willybfriendly at 7:41 pm (utc) on July 24, 2003]
Also, can I get you to remove your URL reference as it is against board policy. Keep in mind that we do not perform site reviews here at the board, thank you.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"__"http://www.w3.org/TR/html4/loose.dtd">
Take out the blank line between <title> and <link> maybe there is a non-printable character there.
Ahhhhhhh... the repeated <link> and <style> after the start of <body> are not valid. They MUST be before the closing </head> instead.
The next repetation of those tags is near the bottom of the page after a </div> tag. That is not valid code. Those <link> and <style> tags must be within <head> ... </head> only.
The problem might be with:
<!--#include file = "_includes/toptest.inc"-->
If you have the <link> and <style> inside that file, then you are inserting it more than once and inserting it in the wrong places.
There was another error, however. It said that the </head> tag was closing an element that was not finished. I tried deleting every meta except for the content-type, but the problem was persistent. Removing comment-tags (pageoneresults) and adding the missing space (g1smd) did not change anything. I think g1smd may be right - at some place a binary character could be there. Anyway, this was not the problem you posted about in the first place, so i thought that your code was actually valid and that the binary character had sneeked in in the process of copying form this forum.
Anyway, g1smd's advice about duplicates sounds like the right thing - i did not know there were duplicates, these should of course be removed.
/claus
I have made progress thanks to ya'll!
I am down to one error. Line 15, column 72: document type does not allow element "LINK" here (explain...).
This is what the validator says line 15 is.
..." type="text/css" href="_includes/texmed.css">
but when I look at line 15 in my document it says
<!--#include file = "_includes/toptest.inc"-->
This is my include page for the top of my webpage.
On the toptest.inc file the CSS link is the very first line on the page. <link rel="stylesheet" type="text/css" href="_includes/texmed.css">
On the page that I am validating, the is the first line after <body>
<!--#include file = "_includes/toptest.inc"-->
I tried changing the CSS file to and include file rather than a link but then the validator gave an error mesage. 500 Internal Server Error
Any more ideas?
Thanks
Janine
The validator does not see the same documant as you do - it sees the documant after it has been parsed.
Use this interface: [validator.w3.org...]
and make sure to check the "Verbose output" option - that way you will get a line-numbered list at the bottom of the validation page with the results that the validator actually sees (that is: the page as it appears on the web after parsing includes, not in your local files)
/claus
The problem might be with:
<!--#include file = "_includes/toptest.inc"-->
If you have the <link> and <style> inside that file, then you are inserting it more than once and inserting it in the wrong places.
but maybe I should have written a longer explanation. Anyway the others managed to do that while I was away.
Success!