Connecting Tech Pros Worldwide Help | Site Map

Various DOCTYPE questions.

Viken Karaguesian
Guest
 
Posts: n/a
#1: Oct 19 '05
Hello all,

I'm somewhat of a newbie to webscripting. I've made a couple of websites in
the past with WYSIWYG software, but now I'm much more interested in manual
scripting. I have some questions about DOCTYPE:

1. Is a doctype statement *required*, or is it just "strongly suggested"? I
would probably be using a Transitional doctype.

2. I understand that in a frameset I must use a Framset Doctype ststement,
but what about the individual pages within the frameset? Must I use the
Frameset Doctype statement in those pages as well? Would they even have a
doctype at all, or is the Frameset doctype enough?

3. Does a doctype statement actually *do* anything, or is it just a
declaration that you're following a standard?

I ask question #3 because none of my websites currently have a DOCTYPE
statement, but inserting a DOCTYPE statement sometimes screws up the
formatting of the page. DIV's don't line up, borders aren't always right,
JavaScripts (that I've downloaded) don't work the same way. Also, horizontal
scroll bars show up where they weren't before. But when I validate the page,
the validator doesn't show anything wrong with the elements that are
affected.

For instance: In my personal homepage, I have a <div> with an orange dotted
border that's lined up within a frame. It lines up nicely the way I intended
it. But when I insert the <Transitional> doctype, the div stretches across
the page and the text doesn't fit right.

So I'm just wondering how important they are. Eventually I want to validate
all my pages and include doctypes. Just in case anyone is interested, here
are two of my sites. Thanks in advance for any replies.

http://home.comcast.net/~vikenk
http://www.sayatnova.com

--
Viken K.
http://home.comcast.net/~vikenk



Arne
Guest
 
Posts: n/a
#2: Oct 19 '05

re: Various DOCTYPE questions.


Once upon a time *Viken Karaguesian* wrote:
[color=blue]
> Hello all,
>
> I'm somewhat of a newbie to webscripting. I've made a couple of websites in
> the past with WYSIWYG software, but now I'm much more interested in manual
> scripting. I have some questions about DOCTYPE:
>
> 1. Is a doctype statement *required*, or is it just "strongly suggested"? I
> would probably be using a Transitional doctype.[/color]

A: It's *required* if you want the page to validate, and even if not
it's "strongly suggested".

Use a full doctype (with the link)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

[color=blue]
> 2. I understand that in a frameset I must use a Framset Doctype ststement,
> but what about the individual pages within the frameset? Must I use the
> Frameset Doctype statement in those pages as well? Would they even have a
> doctype at all, or is the Frameset doctype enough?[/color]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">

Goes only in the frameset file, transitional to all other individual
pages.

[color=blue]
> 3. Does a doctype statement actually *do* anything, or is it just a
> declaration that you're following a standard?[/color]

Yes, it does. It makes the browsers render the pages without guessing
what they should look like, when rendering them in Standard Mode and
not in Quirks Mode.

[color=blue]
> I ask question #3 because none of my websites currently have a DOCTYPE
> statement, but inserting a DOCTYPE statement sometimes screws up the
> formatting of the page. DIV's don't line up, borders aren't always right,
> JavaScripts (that I've downloaded) don't work the same way. Also, horizontal
> scroll bars show up where they weren't before. But when I validate the page,
> the validator doesn't show anything wrong with the elements that are
> affected.
>
> For instance: In my personal homepage, I have a <div> with an orange dotted
> border that's lined up within a frame. It lines up nicely the way I intended
> it. But when I insert the <Transitional> doctype, the div stretches across
> the page and the text doesn't fit right.
>
> So I'm just wondering how important they are. Eventually I want to validate
> all my pages and include doctypes. Just in case anyone is interested, here
> are two of my sites. Thanks in advance for any replies.
>
> http://home.comcast.net/~vikenk
> http://www.sayatnova.com[/color]

Have you really tried to validate your pages? Have you ever looked on
your pages with any other browser than IE? If not, you should. The
front page for home.comcast.net/~vikenk looks very emty in mozilla,
and that's *not* Mozilla's fault :)

Add the doctype declarations and then validate on
http://validator.w3.org/ (HTML)
http://jigsaw.w3.org/css-validator/ (CSS)

You have several serious errors in your CSS.

--
/Arne
Now killing all top posters and posters who don't quote
* How to post: http://www.cs.tut.fi/~jkorpela/usenet/brox.html
* From Google: http://www.safalra.com/special/googlegroupsreply/
-------------------------------------------------------------
Beauregard T. Shagnasty
Guest
 
Posts: n/a
#3: Oct 19 '05

re: Various DOCTYPE questions.


Viken Karaguesian wrote:
[color=blue]
> 1. Is a doctype statement *required*, or is it just "strongly
> suggested"? I would probably be using a Transitional doctype.[/color]

New documents should use a Strict doctype. Transitional is for minor
updates to old legacy pages where you don't want to take the time to do
work such as remove presentational code into a CSS stylesheet.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

See: <http://www.w3.org/QA/2002/04/valid-dtd-list.html>

Also, google for "frames are evil"

--
-bts
-When motorcycling, never follow a pig truck
Viken Karaguesian
Guest
 
Posts: n/a
#4: Oct 19 '05

re: Various DOCTYPE questions.


> Have you really tried to validate your pages? Have you ever looked on[color=blue]
> your pages with any other browser than IE? If not, you should. The
> front page for home.comcast.net/~vikenk looks very emty in mozilla,
> and that's *not* Mozilla's fault :)[/color]

Yes, I have, and they don't validate well. :>( I know how my webpage looks
in Mozzila and have not been able to figure out why it looks like that. I'm
not very knowledgeable about html, so I'm trying to get more in depth to
figure out why it's that way. It seems to look fine in Opera, but some of
the colors seem a bit off.


Beauregard T. Shagnasty
Guest
 
Posts: n/a
#5: Oct 20 '05

re: Various DOCTYPE questions.


Viken Karaguesian wrote:
[color=blue]
> It seems to look fine in Opera, but some of
> the colors seem a bit off.[/color]

Anything to do with "orange" ?

<http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fhome.comcast.net%2F%7Ev ikenk%2Fviken.css&warning=1&profile=css2&usermediu m=all>

--
-bts
-When motorcycling, never follow a pig truck
Darin McGrew
Guest
 
Posts: n/a
#6: Oct 20 '05

re: Various DOCTYPE questions.


[attribution restored]

Arne <invalid@domain.invalid> wrote:[color=blue][color=green]
>> Have you really tried to validate your pages? Have you ever looked on
>> your pages with any other browser than IE? If not, you should. The
>> front page for home.comcast.net/~vikenk looks very emty in mozilla,
>> and that's *not* Mozilla's fault :)[/color][/color]

Viken Karaguesian <vikenk@NOSPAMcomcast.net> wrote:[color=blue]
> Yes, I have, and they don't validate well. :>( I know how my webpage looks
> in Mozzila and have not been able to figure out why it looks like that. I'm
> not very knowledgeable about html, so I'm trying to get more in depth to
> figure out why it's that way. It seems to look fine in Opera, but some of
> the colors seem a bit off.[/color]

Looks fine? Okay, if you say so. My copy of Opera shows a hit counter in
the left frame, which is otherwise empty (and wasting 20-25% of the browser
window). And the right frame shows several empty boxes that look like
they're supposed to be images.
--
Darin McGrew, mcgrew@stanfordalumni.org, http://www.rahul.net/mcgrew/
Web Design Group, darin@htmlhelp.com, http://www.HTMLHelp.com/

"Adventure is nothing but a romantic name for trouble." - Louis L'Amour
Viken Karaguesian
Guest
 
Posts: n/a
#7: Oct 20 '05

re: Various DOCTYPE questions.


> Looks fine? Okay, if you say so. My copy of Opera shows a hit counter in[color=blue]
> the left frame, which is otherwise empty (and wasting 20-25% of the
> browser
> window). And the right frame shows several empty boxes that look like
> they're supposed to be images.[/color]

Really?? When I view with Opera, I see that the hit counter is empty, but I
see all the images...


Darin McGrew
Guest
 
Posts: n/a
#8: Oct 20 '05

re: Various DOCTYPE questions.


Re: http://home.comcast.net/~vikenk/
I wrote:[color=blue][color=green]
>> Looks fine? Okay, if you say so. My copy of Opera shows a hit counter in
>> the left frame, which is otherwise empty (and wasting 20-25% of the
>> browser
>> window). And the right frame shows several empty boxes that look like
>> they're supposed to be images.[/color][/color]

Viken Karaguesian <vikenk@NOSPAMcomcast.net> wrote:[color=blue]
> Really?? When I view with Opera, I see that the hit counter is empty, but I
> see all the images...[/color]

Expanding http://home.comcast.net/~vikenk/home.htm to the full browser
window, there is a grid of 6 images along the right edge. They're all just
white outlines, and it looks like they're all the same image:

http://home.comcast.net/~vikenk/other_pics/cell.gif

A 1x1 GIF? Looking at the source, you seem to be using some JavaScript hack
to replace this image with various other images, based on the ID attribute.

See http://www.xs4all.nl/~sbpoley/webmatters/whatnojs.html
--
Darin McGrew, mcgrew@stanfordalumni.org, http://www.rahul.net/mcgrew/
Web Design Group, darin@htmlhelp.com, http://www.HTMLHelp.com/

"Adventure is nothing but a romantic name for trouble." - Louis L'Amour
Viken Karaguesian
Guest
 
Posts: n/a
#9: Oct 20 '05

re: Various DOCTYPE questions.


[color=blue]
> Expanding http://home.comcast.net/~vikenk/home.htm to the full browser
> window, there is a grid of 6 images along the right edge. They're all just
> white outlines, and it looks like they're all the same image:
>
> http://home.comcast.net/~vikenk/other_pics/cell.gif
>
> A 1x1 GIF? Looking at the source, you seem to be using some JavaScript
> hack
> to replace this image with various other images, based on the ID
> attribute.[/color]

I still see all the images along the right. Yes, it is a Javascript.

Some explanation: According to the author of the menu system that I use (HV
Menu www.burmees.nl/menu), the menu must wait until all the images are
loaded before the menu appears. But if there are lots of images, this will
take lots of time for the menu to appear, especially for the dial-up users.
He claims it's in the design and is inflexible.

His suggested workaround is to load up some dummy images (the 1x1 cell.gif)
to "trick" the menu into appearing first, then using the suggested
Javascript to swap the real images in place of the dummy image. This makes
the menu appear very quickly.

I tried his suggestion and it seemed to work OK. I keep checking his website
to see if he modified the menu to appear before everything else in the page,
but so far, I have the latest version.

I just don't understand why the website looks as it does in Mozilla.


Viken Karaguesian
Guest
 
Posts: n/a
#10: Oct 20 '05

re: Various DOCTYPE questions.


> Have you really tried to validate your pages? Have you ever looked on[color=blue]
> your pages with any other browser than IE? If not, you should. The
> front page for home.comcast.net/~vikenk looks very emty in mozilla,
> and that's *not* Mozilla's fault :)
>
> Add the doctype declarations and then validate on
> http://validator.w3.org/ (HTML)
> http://jigsaw.w3.org/css-validator/ (CSS)[/color]

My cleaned-up CSS now validates!


Darin McGrew
Guest
 
Posts: n/a
#11: Oct 20 '05

re: Various DOCTYPE questions.


I wrote:[color=blue][color=green]
>> Expanding http://home.comcast.net/~vikenk/home.htm to the full browser
>> window, there is a grid of 6 images along the right edge. They're all just
>> white outlines, and it looks like they're all the same image:
>>
>> http://home.comcast.net/~vikenk/other_pics/cell.gif
>>
>> A 1x1 GIF? Looking at the source, you seem to be using some JavaScript
>> hack to replace this image with various other images, based on the ID
>> attribute.[/color][/color]

Viken Karaguesian <vikenk@NOSPAMcomcast.net> wrote:[color=blue]
> I still see all the images along the right. Yes, it is a Javascript.
>
> Some explanation: According to the author of the menu system that I use[/color]

Menu system? What menu? There was no menu.

See http://www.xs4all.nl/~sbpoley/webmatters/whatnojs.html
--
Darin McGrew, mcgrew@stanfordalumni.org, http://www.rahul.net/mcgrew/
Web Design Group, darin@htmlhelp.com, http://www.HTMLHelp.com/

aquapella /"a-kw&-'pe-l&/ adj. sung in the shower
Darin McGrew
Guest
 
Posts: n/a
#12: Oct 20 '05

re: Various DOCTYPE questions.


I wrote:[color=blue][color=green]
>> Menu system? What menu? There was no menu.[/color][/color]

Viken Karaguesian <vikenk@NOSPAMcomcast.net> wrote:[color=blue]
> Ahhhhh...I see. You were only looking at the "home.htm" page?[/color]

Originally, I went to http://home.comcast.net/~vikenk/

As I said earlier, the left frame contained only a hit counter. So I
expanded the right frame to take the whole window.
[color=blue]
> BTW, my version of Opera is: 7.54u2[/color]

Mine is version 8.5.

JavaScript is normally disabled.

See http://www.xs4all.nl/~sbpoley/webmatters/whatnojs.html
--
Darin McGrew, mcgrew@stanfordalumni.org, http://www.rahul.net/mcgrew/
Web Design Group, darin@htmlhelp.com, http://www.HTMLHelp.com/

aquapella /"a-kw&-'pe-l&/ adj. sung in the shower
Alan J. Flavell
Guest
 
Posts: n/a
#13: Oct 20 '05

re: Various DOCTYPE questions.


On Wed, 19 Oct 2005, Viken Karaguesian wrote:
[color=blue]
> I still see all the images along the right.[/color]

Try reading the followup you got. Otherwise, the time that you're
wasting isn't only your own.
[color=blue]
> Yes, it is a Javascript.[/color]

Then stop making your pages *dependent* on Javascript. As has already
been pointed out to you.
[color=blue]
> Some explanation:[/color]

It's *you* who is in need of explanation, not us. So try reading the
explanations; or stop asking for advice and failing to take it.


--

Since XP XP2, you have the option: of having your Windows dangerously
open, or uselessly shut. -- Richard Bos in the Monastery
Viken Karaguesian
Guest
 
Posts: n/a
#14: Oct 20 '05

re: Various DOCTYPE questions.


> Menu system? What menu? There was no menu.

Ahhhhh...I see. You were only looking at the "home.htm" page? The full
website is actually a frames page (I know, I know....frames are evil).

Go to http://home.comcast.net.~vikenk to view the page in it's entirety.

BTW, my version of Opera is: 7.54u2


Viken Karaguesian
Guest
 
Posts: n/a
#15: Oct 20 '05

re: Various DOCTYPE questions.


>> BTW, my version of Opera is: 7.54u2[color=blue]
>
> Mine is version 8.5.
>
> JavaScript is normally disabled.[/color]

Could that be why the Menu never appeared? Without Javascript, the image
swap never executed so the Menu never appeard? I dunno. What I *do* know is
that the 250 MB of free space Comcast gives me is on extremely slow servers!


Viken Karaguesian
Guest
 
Posts: n/a
#16: Oct 20 '05

re: Various DOCTYPE questions.


> JavaScript is normally disabled.

Never mind my previous post. The entire menu is based on Javascript. THAT's
why you never saw it...


Viken Karaguesian
Guest
 
Posts: n/a
#17: Oct 20 '05

re: Various DOCTYPE questions.


WOW! Are you guys always this nasty to beginners who ask for advice??
SHEESH!


Arne
Guest
 
Posts: n/a
#18: Oct 20 '05

re: Various DOCTYPE questions.


Once upon a time *Viken Karaguesian* wrote:[color=blue][color=green]
>> Have you really tried to validate your pages? Have you ever looked on
>> your pages with any other browser than IE? If not, you should. The
>> front page for home.comcast.net/~vikenk looks very emty in mozilla,
>> and that's *not* Mozilla's fault :)
>>
>> Add the doctype declarations and then validate on
>> http://validator.w3.org/ (HTML)
>> http://jigsaw.w3.org/css-validator/ (CSS)[/color]
>
> My cleaned-up CSS now validates![/color]

That's a good start. Now start using valid CSS the right way to make
the page work. :)

Remove the class="info" div tag from the page, so the text gets
visible. I don't know what it's supposed to do and can't see any need
of it.

--
/Arne
Now killing all top posters and posters who don't quote
* How to post: http://www.cs.tut.fi/~jkorpela/usenet/brox.html
* From Google: http://www.safalra.com/special/googlegroupsreply/
-------------------------------------------------------------
Arne
Guest
 
Posts: n/a
#19: Oct 20 '05

re: Various DOCTYPE questions.


Once upon a time *Beauregard T. Shagnasty* wrote:
[color=blue]
> Viken Karaguesian wrote:
>[color=green]
>> 1. Is a doctype statement *required*, or is it just "strongly
>> suggested"? I would probably be using a Transitional doctype.[/color]
>
> New documents should use a Strict doctype. Transitional is for minor
> updates to old legacy pages where you don't want to take the time to do
> work such as remove presentational code into a CSS stylesheet.[/color]

Well, he is using frames, so the Transitional is required in order to
get the "target" attribute valid.
[color=blue]
> Also, google for "frames are evil"[/color]

Oh, yes. That's a totaly different matter :)

--
/Arne
Now killing all top posters and posters who don't quote
* How to post: http://www.cs.tut.fi/~jkorpela/usenet/brox.html
* From Google: http://www.safalra.com/special/googlegroupsreply/
-------------------------------------------------------------
Pierre Goiffon
Guest
 
Posts: n/a
#20: Oct 20 '05

re: Various DOCTYPE questions.


Viken Karaguesian wrote:[color=blue]
> I'm somewhat of a newbie to webscripting. I've made a couple of websites in
> the past with WYSIWYG software, but now I'm much more interested in manual
> scripting. I have some questions about DOCTYPE:
>
> 1. Is a doctype statement *required*, or is it just "strongly suggested"? I
> would probably be using a Transitional doctype.[/color]

As answered by someone else, a webpage _should_ include a doctype.
[color=blue]
> 2. I understand that in a frameset I must use a Framset Doctype ststement,
> but what about the individual pages within the frameset?[/color]

The page within the frameset, if they use HTML 4.01 for exemple, should
include a corresponding doctype. The frameset doctypes are to be used
only in pages containing the frameset elements.

For a list of existing doctypes you can read :
"Recommended DTDs to use in your Web document."
http://www.w3.org/QA/2002/04/valid-dtd-list.html
[color=blue]
> 3. Does a doctype statement actually *do* anything, or is it just a
> declaration that you're following a standard?[/color]

Very good question !
The first goal of a doctype is to indicate the version of (x)html used
in the document. But... Since Internet Explorer for Macintosh 5, most
browser use a "doctype switching mode". You can find some informations
about this here :
http://hsivonen.iki.fi/doctype/
Andreas Prilop
Guest
 
Posts: n/a
#21: Oct 20 '05

re: Various DOCTYPE questions.


On Wed, 19 Oct 2005, Viken Karaguesian wrote:
[color=blue]
> http://home.comcast.net/~vikenk
> http://www.sayatnova.com[/color]

Welcome to the universe of the clueless!
http://google.com/search?q=This.page.uses.frames.but.your.browser.do esn't.support.them

--
Netscape 3.04 does everything I need, and it's utterly reliable.
Why should I switch? Peter T. Daniels in <news:sci.lang>

al jones
Guest
 
Posts: n/a
#22: Oct 21 '05

re: Various DOCTYPE questions.


On Wed, 19 Oct 2005 20:45:43 -0400, Viken Karaguesian wrote:
[color=blue]
> WOW! Are you guys always this nasty to beginners who ask for advice??
> SHEESH![/color]

Having been where you are - and probably will be again - they *aren't*
being nasty. I've gotten some exceptional help from the gang here - and
I've fought tooth and nail sometimes to understand what it is they're
telling me. Refused their ideas and come to regret it.

It's like taking your car to the garage - if you don't know how to fix it
you take it to someone you trust - and I've come to trust these guy (and
gals) even when they're rough enough to tell me that my whole car needs
replacing, forget about replacing the fan belt.

You've gotten some good advice, stop fighting it (I say to myself, as much
as you) and learn why they're telling you what they are.

Kick back, have a tall one and then re-read what they're saying and try it
again - and again - and again - till you get it right! //al (still working
on it!))
Eric B. Bednarz
Guest
 
Posts: n/a
#23: Oct 22 '05

re: Various DOCTYPE questions.


Pierre Goiffon <pgoiffon@free.fr.invalid> writes:
[color=blue]
> The first goal of a doctype is to indicate the version of (x)html used
> in the document.[/color]

It's the attack of the '90ies.

Reloaded.

Precisely how, according to you, does it achieve that goal?



Oh well...

<http://validator.w3.org/check?uri=http%3A%2F%2Fbednarz.nl%2F%2B%2Fsgml%2Fd octype%2Fversion-info;ss=1;sp=1>

(*sigh*)
Pierre Goiffon
Guest
 
Posts: n/a
#24: Oct 24 '05

re: Various DOCTYPE questions.


Eric B. Bednarz wrote:[color=blue][color=green]
>>The first goal of a doctype is to indicate the version of (x)html used
>>in the document.[/color]
>
> Precisely how, according to you, does it achieve that goal?[/color]

I didn't understand very well your post
Anyway, a doctype indicates what DTD is in use. Isn't it a synonym for
"the version of (x)html used in the document" ?
Eric B. Bednarz
Guest
 
Posts: n/a
#25: Oct 24 '05

re: Various DOCTYPE questions.


Pierre Goiffon <pgoiffon@free.fr.invalid> writes:
[color=blue]
> Anyway, a doctype indicates what DTD is in use.[/color]

It depends on what you mean by 'indicates' and 'DTD'.

The doctype declaration *contains* the 'DTD in use' (for that one single
document instance). Well, if no explicit subset is present at all, one
could say that the root element 'indicates' the possible corresponding
default entry in a catalog.

If you mean DTD in the sense of 'public text class document type
declaration subset', that's what the doctype thingie indeed 'indicates';
if you mean 'Document Type Definition' in the more general meaning of a
set of formal markup declarations and some prose describing their
purpose, then no, the doctype declaration is no indication at all that
this definition actually applies.
[color=blue]
> Isn't it a synonym for
> "the version of (x)html used in the document" ?[/color]

No. Take the time to read

<http://groups.google.com/group/comp.text.sgml/msg/c3e53dee2c152a81>

That's why doctype sniffing is such utter complete nonsense (it should
be noted, by the way, that SGML does not allow its -- conforming --
applications mystery meat restrictions as expressed in 7.2 of HTML 4;
but the HTML spec is stuffed with blunders anyway; as discussed in
another group just recently, the id attribute value is defined as 'case
sensitive' -- and 'web standards aware' application developers naturally
make some fuss about implementing that -- in the prose while it has a
declared value of ID and case folding applies... DOH).
Pierre Goiffon
Guest
 
Posts: n/a
#26: Oct 25 '05

re: Various DOCTYPE questions.


Eric B. Bednarz wrote:[color=blue][color=green]
>>Anyway, a doctype indicates what DTD is in use.[/color]
>
> It depends on what you mean by 'indicates' and 'DTD'.[/color]
(...)[color=blue][color=green]
>>Isn't it a synonym for
>>"the version of (x)html used in the document" ?[/color]
>
> No. Take the time to read
>
> <http://groups.google.com/group/comp.text.sgml/msg/c3e53dee2c152a81>[/color]
(...)

Thanks for these informations
I'll read them back home
Closed Thread