Reputation: 644
My homepage showing an error in W3C validator check:
Error Line 19, Column 90: character data is not allowed here
…stylesheet" type="text/css"
href="/CFIDE/scripts/ajax/resources/yui/yui.css" />
You have used character data somewhere it is not permitted to appear. Mistakes that can cause this error include:
putting text directly in the body of the document without wrapping it in a container element (such as a paragraph), or
forgetting to quote an attribute value (where characters such as "%" and "/" are common, but cannot appear without surrounding quotes), or
using XHTML-style self-closing tags (such as ) in HTML 4.01 or earlier. To fix, remove the extra slash ('/') character. For more information about the reasons for this, see Empty elements in SGML, HTML, XML, and XHTML.
Upvotes: 0
Views: 3083
Reputation: 11
Remove the last slash as below :-
…stylesheet" type="text/css" href="/CFIDE/scripts/ajax/resources/yui/yui.css" >
Upvotes: 1
Reputation: 201818
The error message you have quoted contains a rather good description of the issue, which may be caused by different markup errors. In this case, the error message apparently relates to a link
element, and therefore item 3 applies.
Consider the following test document:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<title></title>
<link rel="stylesheet" type="text/css"
href="/CFIDE/scripts/ajax/resources/yui/yui.css" />
This causes first the error message “NET-enabling start-tag requires SHORTTAG YES” and the message presented in the question. The reason is that in HTML 4.01 syntax, the slash /
before >
is formally invalid (or, to be very exact, causes the document to become invalid), even though browsers skip it.
Thus, the solution is to remove the slash. An alternative solution would be to declare an XHTML doctype, but then you would need to write everything in XHTML syntax in order to validate (and XHTML as delivery format on web pages has no advantages).
Upvotes: 1