Gossamer Forum
Home : General : Internet Technologies :

HTML Validating .. how to use "special" charachters?

Quote Reply
HTML Validating .. how to use "special" charachters?
Hi,

I'm trying to make one of our sites XHTML 1.0 compitent. I'm running it through w3.org's validator, but its giving me errors :(

My header lines are;

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

... and then alongside the other <meta> tags;

Code:
<meta http-equiv="Content-Language" content="en-gb" />
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />

..and then inside the "body" tag;

Code:
The Firm&#146;s

for some reason, although &#146; should equate to a ' , the validator is going mad about it.

Is there an easy way around this? The whole reason we are escaping every non-standard (a-z or 0-9) into its HTML value.

TIA

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] HTML Validating .. how to use "special" charachters? In reply to
Different charster, maybe utf-8 encoding?

- wil
Quote Reply
Re: [Wil] HTML Validating .. how to use "special" charachters? In reply to
Yeah, the problem is.. that if we do use UTF-8, it then shows the wrong charachters :/

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] HTML Validating .. how to use "special" charachters? In reply to
Just tried it with UTF-8, and the same problem :(

I thought it may have something to do with the charachter itself;

` and ’ , which I'm now translating to ' , as thats a more generic charachter.

However, it *still* gives me this friggin error :(

TIA

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] HTML Validating .. how to use "special" charachters? In reply to
Still giving me those errors :(

Also, now giving me an error about the HEAD section;

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Business and Management: Critically evaluate the usefulness of Eclectic theory of...</title>
<meta http-equiv="Content-Language" content="en-gb" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
body {
background: #fff;
color: #000;
margin: 0;
padding: 20px;
font: normal 11px/140% verdana, arial, sans-serif;
}
</style>
</head>
<body class="body">

The main errors are;

Quote:
Line 9, column 67: document type does not allow element "META" here

..."Content-Type" content="text/html; charset=utf-8" />

The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).

&#9993;

Line 10, column 22: document type does not allow element "STYLE" here

<style type="text/css">

&#9993;

Line 46, column 6: end tag for element "HEAD" which is not open

</head>

The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.

If this error occured in a script section of your document, you should probably read this FAQ entry.

I really do have no idea whats going on :/ All the tags seem to be opened/closed ok , but it just keeps on giving errors :(

TIA

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] HTML Validating .. how to use "special" charachters? In reply to
In your last post you have <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">


instead of:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

---

One common cause for this error is the use of XHTML syntax in HTML
documents. Due to HTML's rules of implicitly closed elements, this
error can create cascading effects. For instance, using XHTML's
"self-closing" tags for "meta" and "link" in the "head" section of a
HTML document may cause the parser to infer the end of the "head"
section and the beginning of the "body" section (where "link" and
"meta" are not allowed; hence the reported error).