Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Let us discuss Doctype.

Let us discuss Doctype.
Thread Tools
Addicted to MacNN
Join Date: Jan 2001
Location: The Sar Chasm
Status: Offline
Reply With Quote
Mar 2, 2002, 06:25 PM
 
I'm not a hand-coder, although I'm learning a bit as I go. I'm building (slowly) my homepage in GoLive, which up until now, didn't automatically place a Doctype in the head. GL 6 has Doctype options, but which to use?

I suppose if I wsere using frames (I'm not) I'd want 4.01 frameset.

I'm not using CSS, since it's just a personal homepage, and I don't give a darn about consistency from page to page.

Should I be using Doctype 4.01 transitional, or 3.2? (I'm assuming with <font> tags 4.01 strict is out)

What does all this mean, and what's best for a basic webpage, just built using tables, jpegs, text and the occasional javascript rollover?

CV

When a true genius appears in the world you may know him by this sign, that the dunces are all in confederacy against him. -- Jonathan Swift.
     
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status: Offline
Reply With Quote
Mar 3, 2002, 02:19 AM
 
Originally posted by chris v:
<STRONG>I'm not a hand-coder, although I'm learning a bit as I go. I'm building (slowly) my homepage in GoLive, which up until now, didn't automatically place a Doctype in the head. GL 6 has Doctype options, but which to use?

I suppose if I wsere using frames (I'm not) I'd want 4.01 frameset.

I'm not using CSS, since it's just a personal homepage, and I don't give a darn about consistency from page to page.

Should I be using Doctype 4.01 transitional, or 3.2? (I'm assuming with &lt;font&gt; tags 4.01 strict is out)

What does all this mean, and what's best for a basic webpage, just built using tables, jpegs, text and the occasional javascript rollover?

CV</STRONG>
Some browsers actually interpret HTML slightly differently depending on the DOCTYPE you specify, so it can be an important decision to make.

The easiest rule 'o thumb is to make a decision about the browser support you're offering - if you really give a damn about Browser 3 and earlier, then using HTML 3.2 is probably the best bet - just don't start inserting any HTML 4 attributes in there or you'll get some inconsistencies.

Otherwise 4.01 is the best bet - BBEdit and some other HTML tools will point out which parts of your code are non-4.01 compliant. The FONT tag is definitely a 4.01 strict NO-NO!

I'm hoping GL6 may even slightly modify the kind of code written depending on the doctype... but that's a guess as I haven't played with the release version yet.
Computer thez nohhh...
     
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Mar 3, 2002, 02:30 AM
 
Originally posted by chris v:
<STRONG>Should I be using Doctype 4.01 transitional, or 3.2? (I'm assuming with &lt;font&gt; tags 4.01 strict is out)</STRONG>
Sounds like 4.01 transitional is the one you want, if you're looking for minimal changes to your code.
What does all this mean, and what's best for a basic webpage, just built using tables, jpegs, text and the occasional javascript rollover?
The best thing to do for a site like you mentioned is to convert to CSS layout and then go with HTML Strict (among other things, the more stuff you use CSS for, the more -and cooler- tricks you can pull off in your JavaScript, should you be inclined to play around with it). Failing that, Transitional is your best bet.

What does it all mean?

Basically, HTML 4.0 was split into three specific documents. Framesets got their own Doctype; that's the Frameset DTD, and it's only used for defining those framesets. This DTD isn't likely to be updated in the future, but there's not much of a need; it's forward-compatible with later HTML documents.

HTML 4.0 Strict was the W3C's attempt to get people to write structural HTML, rather than the table-based tag soup that was prevalent at the time (and, sadly, still is). This is where HTML is going in the future, and it deptrcated a lot of tags.

However, the W3C did see a need for backward-compatibility, at least in the short term. So they made a third DTD, HTML Transitional, which was basically Strict plus all the stuff they'd taken out of earlier HTML versions. I say "basically", because some tags like STRIKE were added in too, though these new tags were deprecated from the very beginning, for the sake of completeness.
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
     
chris v  (op)
Addicted to MacNN
Join Date: Jan 2001
Location: The Sar Chasm
Status: Offline
Reply With Quote
Mar 3, 2002, 07:47 AM
 
Thanks, y'all. My understanding of the different HTML versions is still a little nebulous, but I'll go with the 4.01 transitional for now. I know I've got to learn CSS at some point, but I need to get the basics down, first, then tackle the more arcane stuff.

I've got lotsa books, and I'm reading...

CV

When a true genius appears in the world you may know him by this sign, that the dunces are all in confederacy against him. -- Jonathan Swift.
     
Dedicated MacNNer
Join Date: Nov 2001
Location: Are Eye
Status: Offline
Reply With Quote
Mar 3, 2002, 03:44 PM
 
If you do decide that CSS is for you, Here is a good introduction tutorial to CSS.

And no plug for tutorials would complete without mentioning the expansive well written tutorials on www.webmonkey.com
     
chris v  (op)
Addicted to MacNN
Join Date: Jan 2001
Location: The Sar Chasm
Status: Offline
Reply With Quote
Mar 3, 2002, 04:56 PM
 
Originally posted by registered_user:
<STRONG>If you do decide that CSS is for you, Here is a good introduction tutorial to CSS.

And no plug for tutorials would complete without mentioning the expansive well written tutorials on www.webmonkey.com</STRONG>
Thanks for theheads up. I do intend to learn all his-- don't ask me why. I'm totally self-taught, (with a liberal dose of help from folks around here ) and am using my homepage as a sort of real-word tutorial program. It's going slowly, but it's coming together.

Thanks,
CV

When a true genius appears in the world you may know him by this sign, that the dunces are all in confederacy against him. -- Jonathan Swift.
     
Grizzled Veteran
Join Date: Nov 2001
Location: Oregon
Status: Offline
Reply With Quote
Mar 7, 2002, 01:42 PM
 
CSS should be used for so many reasons, not just consistency across pages. I think CSS makes your life easier, and allows much more control over even a single page's layout. Some good links for webmasters, including CSS info, can be found on Things Macintosh (Webmastering).

My understanding of the different HTML versions is still a little nebulous, but I'll go with the 4.01 transitional for now.
Don't use the transitional unless you have a bunch of code which was using deprecated tags that you don't want to change right away. If you're just learning this stuff, jump right into the final. No value in learning deprecated code and then learning the modern stuff. You wouldn't eat a moldy sandwich before eating a fresh one in front of you, would you?

I know I've got to learn CSS at some point, but I need to get the basics down, first, then tackle the more arcane stuff.
No, no, no! Don't think of CSS as difficult. If you do, it will be difficult. In reality, it is no more difficult than anything else in HTML. In many ways, CSS is simpler because it frees you from having to learn a bunch of deprecated tags to manipulate style and layout. Just start out with a few simple &lt;style&gt; declarations in your page (not in a separate style file), and maybe a class or two you use in a &lt;span&gt; or &lt;p&gt; tag or two (as in the sample code below). By playing with it, you'll begin to see how it works. Once you get the basics, then you can learn how to do the fancy stuff. Here's a simple little sample:
<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>&lt;!DOCTYPE HTML PUBLIC <font color = red>"-<font color = brown>//W3C//DTD HTML <font color = blue>4.01</font>//EN"</font>&gt;</font>
&lt;HTML&gt;
&lt;HEAD&gt;
&lt;meta http-equiv=<font color = red>"Content-Type"</font> content=<font color = red>"text/html; charset=macintosh"</font>&gt;
&lt;TITLE&gt;My CSS Test Page&lt;/TITLE&gt;

&lt;style type=<font color = red>"text/css"</font>&gt;

.myStyle {
font-family: <font color = red>"Lucida Grande"</font>, verdana, arial, sans-serif;
font-size: medium;
text-align: center;
color: gray;
}

.myOtherStyle {
font-size: <font color = blue>130</font>%;
font-weight: bold;
font-style: italic;
color: olive;
text-decoration: underline;
}

P {
font-family: <font color = red>"Optima"</font>, <font color = red>"Lucida Grande"</font>, textile, sans-serif;
font-size: large;
text-align: right;
color: red;
}

BODY {
font-family: <font color = red>"Papyrus"</font>, <font color = red>"Herculanum"</font>, fantasy;
background-color: #ffa;
color: black;
}

&lt;/style&gt;

&lt;/HEAD&gt;
&lt;body&gt;

This is my test page.

&lt;p&gt;
It is not your test page.

&lt;p class=<font color = red>"myStyle"</font>&gt;
I will never &lt;span class=<font color = red>"myOtherStyle"</font>&gt;give it up&lt;/span&gt; to anyone else!
&lt;/p&gt;

The End.

&lt;/BODY&gt;
&lt;/HTML&gt;
</font>[/code]

[ 03-07-2002: Message edited by: Rainy Day ]
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:44 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2