code does not validate

C

charles cashion

I have worked on it until I am down to one warning.
I have read (almost) all suggested pages associated
with this warning. I have made two suggested changes,
but it still have one warning.

I have compared the first few lines with at least
fifty other web pages, and copied what might have
been missing from my web page. This is my web site.

http://dunjas.com/FontTest.html

The warning says I must declare my character set.
I think the <meta... line does that.
You can click here to directly view the warning.

http://validator.w3.org/check?uri=h...(detect+automatically)&doctype=Inline&group=0

*QUESTION* How do I remove this warning? Can you
suggest something to read which will tell me how
to fix it?

Thanks,
Charles
 
R

rf

I have worked on it until I am down to one warning.
The warning says I must declare my character set.
*QUESTION* How do I remove this warning?

Declare a character set. It's a meta element (http-equiv, content).

The text of the warning points to "a few tips..." on how to do this. Or just
look at the source that came from the validator.
 
H

Harlan Messinger

rf said:
Declare a character set. It's a meta element (http-equiv, content).

The text of the warning points to "a few tips..." on how to do this. Or just
look at the source that came from the validator.

Well, actually, the *server* should be configured to send an HTTP header
with this information. Failing that, and especially if the server is
configured to send the *wrong* information, the next best approach if
one is using any kind of server-side technology like PHP or ASP(.NET) is
to set the character set programmatically. The meta tag solution is a
last resort (though it's the only resort for an HTML document being
opened locally instead of being requested from a web server).
 
C

charles cashion

rf said:
Declare a character set. It's a meta element (http-equiv, content).

The text of the warning points to "a few tips..." on how to do this. Or just
look at the source that came from the validator.

*QUESTION* Where is the source that came from the validator?
--cc
 
E

Ed Mullen

charles said:
I have worked on it until I am down to one warning.
I have read (almost) all suggested pages associated
with this warning. I have made two suggested changes,
but it still have one warning.

I have compared the first few lines with at least
fifty other web pages, and copied what might have
been missing from my web page. This is my web site.

http://dunjas.com/FontTest.html

The warning says I must declare my character set.
I think the <meta... line does that.
You can click here to directly view the warning.

http://validator.w3.org/check?uri=h...(detect+automatically)&doctype=Inline&group=0


*QUESTION* How do I remove this warning? Can you
suggest something to read which will tell me how
to fix it?

Thanks,
Charles

Add this under the Title meta tag:

<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">


--
Ed Mullen
http://edmullen.net
http://mozilla.edmullen.net
http://abington.edmullen.net
Chaos, panic, & disorder -- my work here is done.
 
C

charles cashion

dorayme said:

OK.
I have read the thread.
Since I am not firing blanks, and I am not messing with XHTML,
and I am not using &amp; ... may I buy a vowel?

I am using &lt: and &gt;. I suppose I could remove all entities
and see if the validator likes that better. ... I will get back
to you on this one.

I have tried both (one at a time)...
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
but the warning remains.
Thanks,
Charles
 
J

Jonathan N. Little

OK.
I have read the thread.
Since I am not firing blanks, and I am not messing with XHTML,
and I am not using &amp; ... may I buy a vowel?

I am using &lt: and &gt;. I suppose I could remove all entities
and see if the validator likes that better. ... I will get back
to you on this one.

I have tried both (one at a time)...
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
but the warning remains.


The only URL you provide in the thread it above and has no such meta tags.

Try as your template:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<meta http-equiv="content-language" content="en-us">
<title>template</title>
</head>
<body>
<!-- put your markup here -->

</body>
</html>
 
D

dorayme

Ed Mullen said:
dorayme wrote:
I can't. The text is too small and when I enlarge it enough to read I
have to scroll horizontally. Waaay too much trouble. Was there some
specific point you wanted to make?
You know Ed, this morning, I have clean forgot! Sorry, I might
have been confusing issues in haste. Forget what I said.

Not satisfied with this reply? OK. what about: It seems I was
looking for another thread more on the issue and confused this
one with another that was confused with a thread that happened to
be relevant but whose relevance could be confused by those
distracted by another confused thread on an issue that could
easily be confused with this one or the other one and I am hoping
you will let me back out of the room on this one talking as fast
as I can all the way out without giving anyone a chance to say
anything hurtful and humiliating to a simple being, in a delicate
post Xmas phase of life... ?

(btw, how do you look up old threads if you don't like Google?
You know you can adjust the frames and stuff? I agree it is not
the best.)
 
C

charles cashion

Jonathan said:
The only URL you provide in the thread it above and has no such meta tags.

Try as your template:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<meta http-equiv="content-language" content="en-us">
<title>template</title>
</head>
<body>
<!-- put your markup here -->

</body>
</html>

Jonathan,
FIRST, You are right. My code contains/contained no meta
tags. I know what went wrong *but* I repeated the error.
I was doing something wrong when I ran ftp.

My code contains font declarations and a strict doctype
does not accept font declarations. The first time I ran
the validator using strict doctype, it gave me *many*
errors. If you respond to this message, please tell me
how to access and examine the strict DTD. (thank you)

I went back to the transitional doctype and installed
your two suggested meta tags and now I have *NO* errors
or warnings.
Charles
 
J

Jonathan N. Little

charles said:
Jonathan,
FIRST, You are right. My code contains/contained no meta
tags. I know what went wrong *but* I repeated the error.
I was doing something wrong when I ran ftp.

My code contains font declarations and a strict doctype
does not accept font declarations.

Then *don't* use the deprecated FONT element.
The first time I ran
the validator using strict doctype, it gave me *many*
errors.

So fix them.
If you respond to this message, please tell me
how to access and examine the strict DTD. (thank you)

Try reviewing

http://www.w3.org/TR/html4/index/elements.html

Note the *Depr.* column and follow the suggested alternative.

Also:
http://www.w3.org/TR/html4/appendix/changes.html#h-A.3.1.2

And:
http://www.w3.org/TR/html4/appendix/changes.html#h-A.3.1.3


I went back to the transitional doctype and installed
your two suggested meta tags and now I have *NO* errors
or warnings.

But this is a *new* page, you are not transitioning from anything. Why
not spend a little time and review the tutorials on www.htmldog.com and
learn about HTML and CSS. If you were thinking about rebuilding your car
engine, would you not consider at least looking at a Chilton's book
before you start?


How to avoid the FONT element. Use style. Either define a class or style
an element directly
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<meta http-equiv="content-language" content="en-us">
<title>Demo</title>
<style type="text/css">
h1 { font-family: "times new roman", times, serif; }
p { font-family: arial, helvetica, sans-serif; }
.blush { color: red; }
.frustration { color: blue; }
</style>

</head>
<body>
<h1>I'm all pointy and Roman</h1>

<p>
But my paragraphs do not have any serifs, and I can
<span class="blush">blush red</span> in the middle
of a sentence with a span element and a class. We
keep offering these suggestions until we are
<span class="frustration">blue in the face</span>,
but people keep using the font element.
</p>

</body>
</html>
 
B

Beauregard T. Shagnasty

charles said:
I went back to the transitional doctype and installed
your two suggested meta tags and now I have *NO* errors
or warnings.

...and reverted to last-century style coding.

<font> == dodo bird

Use CSS instead, and the 4.01 Strict doctype. I already showed you how
to nest font families in one of your other threads.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

correction brings more errors 8
Help with code 0
the final word on my limerick page 10
A Name 7
ping chaddy 6
Help needed with code 5
Transitional validation with "noscript" 8
Why does IE8/9 not pick up my css? 15

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top