DOCTYPE clause

S

shank

Most all of my pages are ASP. Does this line need to be at the top of every
page?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

Presently, DreamweaverMX only adds this line when making a new ASP page.
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>

I also assume this line should be used... correct?
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

thanks
 
S

SeeSchloss

"shank" a écrit :
Most all of my pages are ASP. Does this line need to be at the
top of every page?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
Yes.

Presently, DreamweaverMX only adds this line when making a new
ASP page. <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>

I don't know ASP, maybe this automatically adds the doctype
?
I also assume this line should be used... correct?
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">

Yes (unless the <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
line also adds it).
 
S

Steve Pugh

shank said:
Most all of my pages are ASP. Does this line need to be at the top of every
page?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

A doctype should go at the top of every HTML page, so it may or may
not be at the top of the ASP code, but should be at the top of the
final HTML code sent to the browser.

New pages created today should not use the Transitional doctype (it
was for backwards compatible pages in 1997). Use whichever doctype
accurately describes the version of (X)HTML you are using and which
triggers the display mode you want in those browsers that use doctype
sniffing.
I also assume this line should be used... correct?
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

Optional. The Content-Type header should be sent by the server.
Setting a different value in a meta tag is foolish and should be
ignored, setting the same value can be useful in some circumstances
(such as when a page is saved locally on a not-too-bright OS), but
harmful in others (the charset burp in old versions of Netscape).

Steve
 
M

Michael Weber

Hi shank,

[Fri, 26 Sep 2003 18:05:07 GMT/shank]
Most all of my pages are ASP. Does this line need to be at the top of every
page?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

Presently, DreamweaverMX only adds this line when making a new ASP page.
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>

I also assume this line should be used... correct?
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

You need to set your codepage in DW settings. Use European (8859-2)
oder Island-Mac (8859-1)

<%@LANGUAGE="VBSCRIPT" CODEPAGE="28592"%>

<meta http-equiv="Content-Type" content="text/html; charset=iso-
8859-2">

will be both genereted by DW with European. (8859-2 is a 8859-1
with the new Euro-Symbol "€")

Win 1252 is windows system default.

regs
michael
 
T

Toby A Inkster

Michael said:
will be both genereted by DW with European. (8859-2 is a 8859-1
with the new Euro-Symbol "€")

No, 8859-15 is the updated version of 8859-1. 8859-2 is Central and
Eastern Europe.
 
S

shank

Steve Pugh said:
A doctype should go at the top of every HTML page, so it may or may
not be at the top of the ASP code, but should be at the top of the
final HTML code sent to the browser.

New pages created today should not use the Transitional doctype (it
was for backwards compatible pages in 1997). Use whichever doctype
accurately describes the version of (X)HTML you are using and which
triggers the display mode you want in those browsers that use doctype
sniffing.


Optional. The Content-Type header should be sent by the server.
Setting a different value in a meta tag is foolish and should be
ignored, setting the same value can be useful in some circumstances
(such as when a page is saved locally on a not-too-bright OS), but
harmful in others (the charset burp in old versions of Netscape).

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <[email protected]> <http://steve.pugh.net/>
What type should I be using? In DreamweaverMX, I don't see where I can pick
and choose anything different. I assume I'm doing everything in HTML 4.01.
thanks!
 
T

Tristan Miller

Greetings.

You need to set your codepage in DW settings. Use European (8859-2)
oder Island-Mac (8859-1)

(8859-2 is a 8859-1 with the new Euro-Symbol "€")

Whence comes this nonsense? iso-8859-2 is and always has been the character
set for Eastern European languages such as Hungarian. It does not contain
the euro symbol and it replaces a number of characters from iso-8859-1
which the author may well need if he's intending to write in a Western
European tongue.
 
T

Tristan Miller

Greetings.

Optional. The Content-Type header should be sent by the server.
Setting a different value in a meta tag is foolish and should be
ignored

How is the server supposed to know what language (and hence character set)
any given HTML page is written in? Surely you don't expect someone such as
the OP to understand the intricacies of configuring Apache content
negotiation (if it or anything like it is even available on his host). Nor
could you be suggesting that all people should write their web pages using
the server's default character set and use HTML character entities for any
foreign letters. (One cringes at the very thought of having to manually
type an entire page of Cyrillic or Arabic text using notation.)
 
M

Matthias Gutfeldt

shank said:
What type should I be using? In DreamweaverMX, I don't see where I can pick
and choose anything different. I assume I'm doing everything in HTML 4.01.
thanks!

As far as DW/MX goes, when you click on "New page", it has this tiny
checkbox somewhere down at the right that says "XHTML compatible" (or
something along those lines). If you check that checkbox, DW inserts the
XHTML1.0 Transitional Doctype instead of HTML4.01 Transitional.

If you want to use any other Doctype, simply click on the "View code"
button, and replace the Doctype with the one of your choice. A list of
valid W3C - anointed Doctypes is here:
<http://www.w3.org/QA/2002/04/valid-dtd-list.html>.

DW/MX does quite a good job of writing valid HTML or XHTML (not perfect
- good), but unfortunately it doesn't know the difference between
Transitional and Strict. So you have to be careful with certain elements
and attributes that aren't legal for Strict.

Ideally you'll validate the code of your template before you go into
mass production. Popular validators are the following two:
<http://htmlhelp.com/tools/validator/> or <http://validator.w3.org/>.


Matthias
 
E

Eric B. Bednarz

[It's... the META encoding kludge]
How is the server supposed to know what language (and hence character set)
any given HTML page is written in?

It isn't, it's mainly supposed to be configured to send proper encoding
information, which gives only minor -- if any -- clues about the used
language of the involved resource.
Surely you don't expect someone such as
the OP to understand the intricacies of configuring Apache content
negotiation

Eh, what?
(if it or anything like it is even available on his host). Nor
could you be suggesting that all people should write their web pages using
the server's default character set

Servers have (default or not) *character sets*? That's cute. I'd like
one of them, please.
The character set for HTML is always the same, BTW.
 
T

Tristan Miller

Greetings.

Servers have (default or not) *character sets*?

You know what I meant.
The character set for HTML is always the same, BTW.

According to RFC2616, the default character encoding for the http protocol
is iso-8859-1, though the HTML standard mentions this is "useless" for HTML
documents, for a variety of reasons. It goes on to recommend that the
character encoding be manually set with a meta tag:

"HTML documents may include explicit information about the document's
character encoding; the META element can be used to provide user agents
with this information. For example, to specify that the character encoding
of the current document is "EUC-JP", a document should include the
following META declaration:
<META http-equiv="Content-Type" content="text/html; charset=EUC-JP">"

Source: http://www.w3.org/TR/html4/charset.html#doc-char-set
 
M

Michael Weber

Hi Toby,

[Fri, 26 Sep 2003 19:42:19 +0100/Toby A Inkster]
No, 8859-15 is the updated version of 8859-1. 8859-2 is Central and
Eastern Europe.

Ops, youre right. 15 it was.

regs
michael
 
T

Toby A Inkster

Tristan said:
"HTML documents may include explicit information about the document's
character encoding; the META element can be used to provide user agents
with this information. For example, to specify that the character encoding
of the current document is "EUC-JP", a document should include the
following META declaration:
<META http-equiv="Content-Type" content="text/html; charset=EUC-JP">"

However, the logic behind this is somewhat flawed because to even find
that line the user agent needs to know what character set the document is
in!

And earlier...
How is the server supposed to know what language (and hence character
set) any given HTML page is written in? Surely you don't expect someone
such as the OP to understand the intricacies of configuring Apache content
negotiation (if it or anything like it is even available on his host).

The user doesn't need to know all the inticracies of Apache content
negotiation. Simply name the files like this:

index.html.iso8859-1
search.php.iso8859-15

But then link to them like this.

<p>Can't find what you're looking for? Try the <a href="/index">home
page</a> or <a href="/search">site search</a>.</p>

Yes, on a well set-up server you don't need to give the extensions for
links, but the server still knows the extensions so can find out the
content type (e.g. text/html) and charset.
 
E

Eric B. Bednarz

Tristan Miller said:
You know what I meant.

No I don't. You could be confused about the terminology, the
corresponding subjects, or both:
^^^^^^^^^^^^^
According to RFC2616, the default character encoding
^^^^^^^^^^^^^^^^^^
See? (see also Andreas Prilop's reply)
[...] It goes on to recommend that the
character encoding be manually set with a meta tag:

"HTML documents may include [...]

I'm impressed by the way you managed to drop

| To address server or configuration limitations,

from the beginning of that line.
 

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

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top