Can't Remember Doctypes...Ever

He has: 698 posts

Joined: Jul 2005

I know this is kind of a silly thing, but I have been working on several different projects, and although I always use PHP includes to use a common header across all pages, I always find myself having to copy-and-paste the doctype from one site to the other.

Can anyone actually remember the complete code for a doctype? Obviously if you can remember one you can change some of the words to create a different doctype, but do you find yourself just copying-and-pasting?

Kurtis

greg's picture

He has: 1,581 posts

Joined: Nov 2005

I have to say, I am actually quite pleased I can't remember all that! Laughing out loud

I only can't remember it because I only ever copy and paste it
I suppose if I set about typing it out every time I would remember

But why would you want to remember something like that? copy and paste is fine as I see it. leaves more brain power for the things you should be remembering

Megan's picture

She has: 11,421 posts

Joined: Jun 1999

I copy and paste too. Don't want to make a mistake. I agree with greg about not needing to remember it!

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

I can never remember a doctype. I have bare, valid XHTML templates that I usually start with or grab bits out of.

He has: 1,758 posts

Joined: Jul 2002

Same here... I have a template that I always start with which basically includes the doctype, html, head, title and body tags and a stylesheet link.

I can't remember EVER typing the doctype manually... I first copied it from the W3 site, and I've been copying it ever since! Wink

Andy

JeevesBond's picture

He has: 3,956 posts

Joined: Jun 2002

andy206uk wrote: I can't remember EVER typing the doctype manually... I first copied it from the W3 site, and I've been copying it ever since!

Same here! I always copy from the last site I created (things are always subtly changing and I can't be arsed to keep a template up-to-date!)

a Padded Cell our articles site!

pr0gr4mm3r's picture

He has: 1,502 posts

Joined: Sep 2006

Your editor doesn't do this for you?

greg's picture

He has: 1,581 posts

Joined: Nov 2005

^^^^
that's pretty neat

I use notepad++, and have to say, it may well have that somewhere, but it has taken me 2 months to pick up the basic options and helpful functions

there are enough drop down options to keep me learning for a year I think

suppose I should spend some more time browsing through them
there is also a plugin menu I have never looked into, I can only presume it has many helpful add-ons available I could (and perhaps should) use

still, copying and pasting the doc type is the last of my worries. coding all my sites to xhtml strict gives enough headaches what with the most simple, and importantly 'useful', things being a violation and rendering a file invalid

what IS w3c's problem with the odd line break and link plonked here and there? Confused

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

pr0gr4mm3r;222922 wrote: Your editor doesn't do this for you?

Mine does (nxhtml-mode for Emacs), but I don't use the feature much.

If I'm starting from scratch, I prefer to have a full template rather than just the doctype. If I'm working on code I've written before, it always has a doctype anyway.

If I'm working on someone else's code, it usually has a doctype too. If it doesn't, I probably don't want to insert one, as adding a doctype to invalid code messes up highlighting and such, which I'd rather have on than off.

I think I've only used the feature once, when I needed to change an existing doctype.

Smiling

Megan's picture

She has: 11,421 posts

Joined: Jun 1999

pr0gr4mm3r;222922 wrote: Your editor doesn't do this for you?

Yes, I do that too. Doesn't Bluefish have a whole new page template tool that lets you choose which meta tags and other bits you want to put in? Or maybe I'm thinking of something else...

pr0gr4mm3r's picture

He has: 1,502 posts

Joined: Sep 2006

Megan;222944 wrote: Yes, I do that too. Doesn't Bluefish have a whole new page template tool that lets you choose which meta tags and other bits you want to put in? Or maybe I'm thinking of something else...

Yes, it has that as well.

He has: 16 posts

Joined: Jul 2007

They make it so difficult to remember.

(I also copy-and-paste.)

demonhale's picture

He has: 3,278 posts

Joined: May 2005

add me to the list...

I do have a txt file with all the type of doctypes....

Roo's picture

She has: 840 posts

Joined: Apr 1999

Ditto, copy and paste! There is no way that I can remember all of that! However I can spot when someone has something missing from it.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.