W3C header at the top of an HTML...

User 111435 Photo


Registered User
43 posts

In your Coffee Cup Editor, you have -
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
at the top of your template.

In the W3C website, it mentions using -
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
"http://www.w3.org/TR/REC-html40/strict.dtd">

Which is correct, or are both correct?

This second one does gives some unusual effects, including a different font.
User 463058 Photo


Ambassador
1,073 posts

The second one is correct for the full html strict doctype.

The first one is correct or valid for html transitional, but it's not the complete doctype, so it puts browsers into quirks mode, which makes IE particularly difficult to work with.

The complete html transitional doctype is
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">


The strict doctype should be used when you know the page doesn't have or won't have deprecated code. The transitional doctype tells browsers to be more lenient with their renderings when the page uses deprecated or non-standard code, so this causes differences between the appearances of pages with strict and with transitional doctypes, even if they are otherwise coded exactly the same.

Incomplete doctypes aren't recognized by browsers, so they render in quirks mode which makes pages appear differently again, as they are seen as not having doctypes at all, so browsers work with their own set of rules when figuring out how to render things.

I ended up creating my own "templates" for starting with the full doctypes.
User 111435 Photo


Registered User
43 posts

OK, thanks for the information, it looks like I've got a lot of html pages to update.
User 355448 Photo


Ambassador
3,144 posts

John,

You do know you can use the search and replace to fix every file in a folder?
User 111435 Photo


Registered User
43 posts

No, i'm afraid I don't, that would be very useful (for about 6400 files) - please could you let me know how to.
User 355448 Photo


Ambassador
3,144 posts

John,

You can click on Edit then click on replace, or you can use CTRL-H to open the replace window. You enter the current code that you want replaced in the top box, and the new code in the next window. Below those two windows, you have a selection of three options. The top option is for the current file, the next is for all open documents, and the third allows you to select a folder to modify all files in that folder.

As a shortcut, I high-light the code I want to replace, and enter CTRL-H. The replacement window pops up with the code I want replaced already in the window.

With 6400 files, you may have those in multiple folders, and may need to do each folder, but it will save you a lot of time.
User 111435 Photo


Registered User
43 posts

Thanks Bill, I didn't know that option was available in Coffee Cup Editor V8.

Is Coffee Cup Editor V9 available yet, I thought I saw it around somewhere on the Coffee Cup website, but I seemed to have lost it?
User 355448 Photo


Ambassador
3,144 posts

John,

Actually the current version is 2008. I suspect there will be a new version sometime early in 2009, but this is only a guess.

When you open the HTML Editor, click on help about and you should see the current version. Then look at http://www.coffeecup.com/help/ and click on the top link "Orders & Downloads" and there you should see a list of all the software you have purchased and an indication that you have or have not downloaded the most recent version.

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.