Changing VS2005 to generate HTML 4.01/Strict instead of XHTML 1.0

R

Rob Roberts

Is there any way to change VS2005 to generate HTML 4.01/Strict instead of
XHTML 1.0/Transititional? VS2005 puts a DOCTYPE statement specifying XHTML
1.0/Transitional at the top of every new aspx page. Is there any way to
change it to specify an HTML 4.01/Strict DOCTYPE instead?

Thanks in advance,
--Rob Roberts
 
K

Kim Quigley

Hello,

Would the following solution apply?

Open an aspx page in Source view. Go to View > Toolbars and make sure "HTML
Source Editing" is selected. Look for a drop down list in the toolbar.

Select "HTML 4.01" from that drop down list.

Kim
 
R

Rob Roberts

Kim,
Would the following solution apply?

Open an aspx page in Source view. Go to View > Toolbars and make sure
"HTML Source Editing" is selected. Look for a drop down list in the
toolbar.

Select "HTML 4.01" from that drop down list.

That seems to only affect the HTML validation that the IDE does, exactly the
same as the Text Editor/HTML/Validation/Target option under Tools/Options.
(If you hover your mouse over the drop down list in the HTML Source Editing
toolbar, a hint pops up that says"Target Schema for Validation". It doesn't
seem to affect the DOCTYPE that gets added at the top of new aspx pages.
Even if "HTML 4.01" is selected in the drop down list, new aspx pages still
end up with a DOCTYPE of XHTML 1.0 Transitional.

Or am I missing something?

Thanks,
--Rob Roberts
 
K

Kim Quigley

I was having a problem yesterday that related to the doctype. I was trying
to set the height of a table to 100%, but XHTML doesn't support the height
attribute. (see http://www.bernzilla.com/item.php?id=116 if interested)

I did change the target schema for validation as I suggested, but now I
remember what I did that actually made a difference. I added a MasterPage
file and applied it to all of my pages. Then you only have to change the
doctype that is in the MasterPage. In my case, I just deleted the doctype
tag from the MasterPage file.

Sorry about the misinformation! I know that this solution does not
ultimately answer your question of whether or not you can change the default
doctype, but maybe it will be a workaround that you can use.

Kim
 
R

Rob Roberts

Kim,

Thanks for the additional information. I'm also using a MasterPage, and I
did change the doctype in it, but I was still wondering whether the default
doctype for new pages that don't use this MasterPage could be changed. I
guess it isn't possible...

--Rob Roberts
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top