PDA

View Full Version : Strict or Transitional?



carbonize
09-26-2003, 03:05 PM
This one is mainly for all you hand coders out there. When making your sites do you make your HTML/XHTML strict or do you go for transitional? I was also going to take it further and give the option of saying if you use the URI doctype or prefer to have the browsers render your work in quirks mode but not everyone is familiar with the difference between strict rendering and quirks mode.

Personally I use HTML 4.01 transitional. I prefer to use the URI to make the browsers use strict rendering but as my site contains an example of IE filters I had to make it render in quirks mode.

paulhiles
09-26-2003, 03:58 PM
Hi carbonize

One hand coder raising his hand timidly! :) For HTML sites, I generally go for the 4.01 Transitional doctype. As far as XHTML goes... I'm a bit of a newbie, and struggling to grasp all the nuances between one form and another! It certainly encourages a greater level of care from the coding perspective!
One site I've been asked to modify uses the following doctype:

<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
Seems as though the designers wanted to keep their options open.. but at the moment the site doesn't validate as either Strict or Transitional. Think I could have my work cut out here!! :c)

Paul

ranjan
09-26-2003, 04:27 PM
I voted for strict.

If I am designing a new website, I use the strict DTD. By validating against strict DTD, I eliminate the use of any deprecated tags / attributes. This helps keep my code clean and easily maintainable.

If I am re designing a website that already is built in prior versions of HTML with or without DTDs, I use Transitional DTD because it reduces my work load of getting rid of deprectaed tags / attributes.

It would be a silly to use a transitional dtd in new websites to accomadate elemant that were deprecated in HTML 4.0 which was released in July 1997. You are outdating yourself by almost 6 Years !!

OSFan
09-26-2003, 05:17 PM
I always use HTML 4.1 Transitional. Firstly, it's much easier to code for, err, stating the obvious, less strict.

As for XHTML, I wonder how many browsers fully support it yet. Using transitional makes it more similar to HTML4.1 than using strict XHTML. The idea of XHTML is promote a much better document structure, and take the information on how things actually appear out of the tags, and into style sheets instead. Also, tables are supposed to be replaced for layout with pure CSS layout, a very very complicated process, not because it's difficult to code CSS, but because of browser rendering being different. I've only ever done one page in XHTML1.

carju1
09-26-2003, 05:40 PM
Carbonize I need another button adding...

Button 3 = I Don't understand the question

and maybe even a button 4 = I sort of understand the question & I use whatever tag my tired old brain remembers.

Julian :)

Narasinha
09-27-2003, 01:19 AM
It's been a while since I did a commercial site (but if you need some skilled HTML work done... let me know!), so I can only comment about the work I'm putting into my personal site. It's beginning its third incarnation, and this time I'm making sure it validates as HTML 4.01 strict.

Why go to the trouble of doing that? Well, for one, I like the idea of having the style and content separate. If I want to change a color, I can take care of it site-wide in just one CSS file. Yes, this is possible with transitional, but strict makes it more complete.

Another point is accessibility. I'm not required by law (as US Government sites are) to meet Section 508 accessibility standards for handicapped individuals, but I like the idea that I'm not shutting anyone out. Primarily my personal site contains a lot of genealogical information. I've been contacted by many distant cousins who found their way to my site via Google or some other type of search. Several of these people are in their 70s, and I'm sure their eyesight isn't what it used to be. (I'm just 38 and I know mine isn't!) I fiind it easier to meet accessibility guidelines with strict HTML.

Currently, most of the browsers are very forgiving when it comes to HTML tags. If there's an improperly nested tag or two, they still render the text at least readable. What happens when (or if) the latest browsers don't like the non-standard code? Is that the time to learn to code HTML strict? I'd prefer to have my site up to specs before that happens.

carbonize
09-27-2003, 10:17 AM
It's been a while since I did a commercial site (but if you need some skilled HTML work done... let me know!)
I assume that was meant as a sarcastic joke rather than a serious offer.

Narasinha
09-27-2003, 10:59 AM
It's been a while since I did a commercial site (but if you need some skilled HTML work done... let me know!)
I assume that was meant as a sarcastic joke rather than a serious offer.

Actually, I'm rather serious. I've been out of "the business" for quite some time. I truly enjoy handcrafting HTML (thus the effort I put into my personal site), and would love to do some work that would have a wider audience. Getting an existing site up to 4.01 strict specs would actually be fun. (I can't believe I really said that, but it's true! Must be the masochist in me.)

USALUG
09-27-2003, 11:02 PM
Another vote for HTML 4.01 transitional.

I believe it allows for some extra tag options that strict does not. Specifically in the table/td tagsets.


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

carbonize
09-28-2003, 12:10 AM
USALUG so you like 4.01 transitional but you prefer the browsers to render the page strictly according to the 4.01 transitional specifications and not in quirks mode as you have the URI in your doctype.

drummin
09-28-2003, 01:33 PM
When I built my first site I made it without any doctype declaration because I was just starting to learn HTML and when I tried to add a doctype, things fell apart. So I quess my first site was rendered in quirks mode. This was something that always bothered me and there are tons of sites that don't use a doctype but, when I rebuilt my site, the first thing I did was put strict doctype on top and if something didn't work, I didn't use it. I thought transitional refered to the use of old tags that are on their way out, and I wanted to use the latest tags.
Not having a list of allowable tags, it was hit or miss, but I got the job done. I am sure I have tags that are not allowed in strict, and would really like an EASY TO READ list of allowed elements. If anyone knows a good source, that explans the differences, let me know.
drummin

carbonize
09-28-2003, 02:45 PM
One of the HTML editors I use, Topstyle Pro, shows you all available tags in a side pane. You can select which version of HTML/XHTML you are using and it will only show tags for that. It does the same with CSS ofering a huge variety of variations from CSS safe to Level 2 to selecting particular browsers supported CSS.

Narasinha
09-29-2003, 02:06 AM
I am sure I have tags that are not allowed in strict, and would really like an EASY TO READ list of allowed elements. If anyone knows a good source, that explans the differences, let me know.
drummin

I've become quite fond of a source of both HTML and CSS information put together by Brian Wilson. Last update was June 2003 so it's not terribly out of date like a lot of online references are. They're two separate sites: Index Dot HTML at http://www.blooberry.com/indexdot/html/ and Index Dot CSS at http://www.blooberry.com/indexdot/css/index.html.

He's got good information about what tags are deprecated in 4.01, browser quirks, etc. I use them quite often for both HTML and CSS reference.

The Doctype can really change the display of your style information because of the box-model measurement changes between quirks and standards mode. I just talked about this on another forum here yesterday. Somebody's site got messed up as soon as he put in a Doctype in order to validate the HTML.

paulhiles
09-29-2003, 05:07 AM
I've become quite fond of a source of both HTML and CSS information put together by Brian Wilson. Last update was June 2003 so it's not terribly out of date like a lot of online references are. They're two separate sites: Index Dot HTML at http://www.blooberry.com/indexdot/html/ and Index Dot CSS at http://www.blooberry.com/indexdot/css/index.html.

He's got good information about what tags are deprecated in 4.01, browser quirks, etc. I use them quite often for both HTML and CSS reference.
Excellent find narasinha, I've bookmarked that site as a definite for future use! As you rightly say, so many of the online sources are out of date. I had been using devguru's HTML quick reference, which I found pretty useful... but it's no match for your 'blooberry' site - nice one! :c)

Paul

drummin
10-06-2003, 11:04 AM
Thanks narasinha,

Like paulhiles, I also bookmarked the Blooberry site and will be looking it over. Thanks.
Drummin.