Click to See Complete Forum and Search --> : How can i remove this... <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//E


popcop
03-25-2005, 12:43 PM
when i open a new document in Dreamweaver it puts this code on the top

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

How can i make it so that code is diffrent everytime i open a new document??

I want it just to be:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

But i dont want to have to manually change it myself everytime

Fang
03-25-2005, 12:47 PM
The first one is valid the second is not.

popcop
03-25-2005, 12:51 PM
i need to change it cos it causing me problems... how can i do this ?

the tree
03-25-2005, 01:21 PM
I utterly refuse to belive that's it's causing you problems if you're not doing something wrong.

Somewhere in dreamweavers files there is a bunch of templates and such, edit them, but you'll end up with an invalid website.

shopkanji
03-25-2005, 01:57 PM
What type of problems is it causing?

Every html document needs a tag like that to define what version of HTML is being used. It's pretty standard, and to have correct HTML code it is needed.

If it truely is causing you problem, I beilve you can remove it and the page will display the same, it just won't be valid.

Myself, when in dreamweaver I like putting the code into one line, I just hate how it splits it into two. Making it one line and make it the very first line in your document, and see if it's still causing you trouble.

Jona
03-25-2005, 02:02 PM
I don't think his question was answered, except by the tree (who didn't give a lot of specifics).

Popcop, what everyone is trying to tell you is that the second string is needed for the browser to know exactly where it can find and read the DTD (which specifies which tags are available and how to handle them). I'd recommend the Strict doctype, myself, but if you must use transitional, it's always a good idea to provide the address at which the DTD can be downloaded by the browser.

If adding the address in gives you problems with your page's formatting, you're not even using valid Transitional HTML, which means that you need to write better code, not get rid of standards.

the tree
03-25-2005, 02:12 PM
I don't think his question was answered, except by the tree (who didn't give a lot of specifics).I don't actualy use dreamweaver, or even have a copy of it so I was really just making assumptions, hence the lack of detail.
If it helps: list of valid DTDs (http://www.w3.org/QA/2002/04/valid-dtd-list.html)

popcop
03-25-2005, 02:20 PM
Ok let me explain the kind of problems im gettin with that piece of code in my file.

Basically its effecting my code as to how the HTML sits on the page. Here's an example

Ive set up a HTML page with table 100% width 100% height, within that table i have entered and image and placed it align="center" valign="middle"

so this should mean that when i view that page the image should be in the centre of the page... Right??

Here is the page with this code

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

at the top of the page

www.popcop.co.uk/original (http://www.popcop.co.uk/original)

-----------------------------------------------------------------------

And here is the exact same page with this code

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

at the top of the page

www.popcop.co.uk/original/index_edit.htm (http://www.popcop.co.uk/original/index_edit.htm)

------------------------------------------------------------------------

"http://www.w3.org/TR/html4/loose.dtd" this piece of code is effecting the layout of my pages

Is there anyway of removing that piece of code so that when i open new documents its not there.... so that i dont have to manually remove it everytime

the tree
03-25-2005, 02:28 PM
Yes of course, you can edit the templates, they are most probably in the same folder as your dreamweaver program which likley to be in a folder called "C://Program Files".
However, as we have already stated, this will result in you getting an invalid website.
Also if your table is bugging you so much then why don't you tell me what's wrong with the div I showed you in your other thread?

Fang
03-25-2005, 02:29 PM
The first one renders your page in 'standards mode' and the second in 'quirks mode', see example (http://www.w3.org/International/articles/serving-xhtml/#quirks)
It is advisable to work in 'standards mode' which uses a valid DTD

ray326
03-25-2005, 02:35 PM
Leave the valid doctype in and fix your screwed up HTML.

popcop
03-25-2005, 02:37 PM
Yes of course, you can edit the templates, they are most probably in the same folder as your dreamweaver program which likley to be in a folder called "C://Program Files".
However, as we have already stated, this will result in you getting an invalid website.
Also if your table is bugging you so much then why don't you tell me what's wrong with the div I showed you in your other thread?

That Div code u gave me made no diffrence whatsoever... it was to do with the doctype as ive explain

popcop
03-25-2005, 02:38 PM
Leave the valid doctype in and fix your screwed up HTML.

Explain what you mean????

theres nothing wrong with my code

the tree
03-25-2005, 02:44 PM
theres nothing wrong with my code
http://validator.w3.org/check?verbose=1&uri=http%3A//www.popcop.co.uk/original/
Line 19, column 27: there is no attribute "HEIGHT"

popcop
03-25-2005, 03:12 PM
i entered in 100% into the properties...

so dreamweaver added that code not me... so is dreamweaver wrong ???

ray326
03-25-2005, 03:13 PM
i entered in 100% into the properties...

so dreamweaver added that code not me... so is dreamweaver wrong ???
Yes. There isn't a WYSIWYG HTML editor that generates valid HTML.

the tree
03-25-2005, 03:18 PM
Yes. There isn't a WYSIWYG HTML editor that generates valid HTML.Except Amya (http://www.w3.org/Amaya/) but it's damn unusable.
Hand-coding all the way!

Charles
03-25-2005, 03:36 PM
is dreamweaver wrong ???Yes. That's why one ought never to use it.

MstrBob
03-25-2005, 03:42 PM
Yes. That's why one ought never to use it.

Not for the WYSIWYG features. WYSIWYG editors focus you on the visuals, instead of the data itself. And that's what markup languages are about, data.

The doctype you want is incomplete. That means quirksmodes for browsers, as they assume then that this page is a relic from the past and will render it in the old ways so as not to break it. However, different browsers have different quirks modes. And it will give you a hell of a hard time with, if not completely break, cross-browser support.