Forum Moderators: open

Message Too Old, No Replies

Problem with xhtml validator

         

RammsteinNicCage

9:58 pm on Jan 1, 2004 (gmt 0)

10+ Year Member



I have a page with a xhtml 1.0 strict doctype. When I validate it through the W3dev Menu in Opera, I get this error: "I was not able to extract a character encoding labeling from any of the valid sources for such information." When I manually put the link into the validator or copy and paste the code into it, it works. When I validate a page through the menu that I did not make today, it works perfectly, which makes me think it really isn't a problem with the menu. My doctype declaration is exactly the same as on my other pages. Any ideas?

Jennifer

iamlost

3:00 am on Jan 2, 2004 (gmt 0)

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



This is from w3c answering another person with same problem:

This is telling you that your server is not sending out information about what character encoding is in use for the page. More information about character encodings and web pages is available at
<http://www.w3.org/International/O-HTTP-charset>
(a future version of the Validator will provide that link in the error message).

Hope this helps?

RammsteinNicCage

6:34 am on Jan 2, 2004 (gmt 0)

10+ Year Member



But why would it only do it for the pages I made today and not for all of the other ones?

Jennifer

bofe

6:54 am on Jan 2, 2004 (gmt 0)

10+ Year Member



Character encoding isn't the same thing as Doctype.

Make sure your Metadata in this file is the same as all of your other files.

Depending on your language, your <HTML> tag and a meta tag may look like this:

<html lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

That should validate.

RammsteinNicCage

3:17 pm on Jan 2, 2004 (gmt 0)

10+ Year Member



argh, I did mistakenly delete the meta tag. *stupid, stupid, stupid* ;)

Jennifer

photon

3:35 pm on Jan 5, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Don't feel bad Jennifer. I did the exact same thing this morning. Took me forever to figure it out.

D'oh!

RammsteinNicCage

4:05 pm on Jan 5, 2004 (gmt 0)

10+ Year Member



*feeling better* :)

Jennifer

g1smd

9:18 pm on Jan 12, 2004 (gmt 0)

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




The order of the tags isn't too important, but I would do something like this (encoding first, SE stuff next, styles and javascript last):

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="Content-Language" content="en-gb">
<meta http-equiv="imagetoolbar" content="no">

<title> The Title of the Page </title>
<meta name="Description" content="
Description Goes Here ">
<meta name="Keywords" content="
Keyword List Goes Here ">

<meta name="Generator" content="WordPad">
<meta name="Date" content="2003-07-30">
<meta name="Author" content="
Author Details .">

<meta name="MSSmartTagsPreventParsing" content="TRUE">
<meta name="robots" content="index,follow">

<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"> @import url(
stylemain.css); </style>

<script type="text/javascript" src="script.js"></script>

</head>

<body>

The Generator, Date, and Author information isn't important for search engines, but can be useful for document version control when multiple people edit the pages, especially for companies.

The encoding information ought to go first, I guess, as I have heard that there are some issues with browsers designed for the far-East in that the page <title> at the top of the browser window may not display correctly if it is located before the encoding information for the page in the coding.

grahamstewart

12:24 am on Jan 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Wow! So many meta-tags. Does anything actually ever look at tags like Author or Date?

For comparison here is my standard head (using HTML4.01 Strict)..

[pre]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>Blah blah blah</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta name="keywords" content="blah blah">
<meta name="description" content="blah.com specialise in selling blah">
<link rel="stylesheet" type="text/css" media="all" href="/styles/default.css">
<link rel="stylesheet" type="text/css" media="print" href="/styles/print.css">
</head>
[/pre]

On larger sites I also throw in

<link rel="home¦contents¦prev¦next
etc as a special treat to those using more capable browsers :)