Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   HTML (http://www.velocityreviews.com/forums/f31-html.html)
-   -   What doctype should I use ? (http://www.velocityreviews.com/forums/t722757-what-doctype-should-i-use.html)

graphicsxp 05-11-2010 01:59 PM

What doctype should I use ?
 
Hi,

I've been using the following doctype for my website:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

When I use the W3 validator I get 17 errors, but the good news is that
they are all easy to fix.

However with their tool, I have the option to select xhtml1-strict.dtd
and this time I get 28 errors. Some of them are not so easy to fix.

My question is, what doctype should I use anyway ? Ive been using
transitional.dtd only because my IDE (Visual Studio) added this one
for me and I never really thought about it until I decided to validate
my pages.

Thanks

Adrienne Boswell 05-11-2010 03:11 PM

Re: What doctype should I use ?
 
Gazing into my crystal ball I observed graphicsxp
<graphicsxp@googlemail.com> writing in news:314b24e2-2902-411f-b20d-
9c4b7fbb9c80@k2g2000yqe.googlegroups.com:

> Hi,
>
> I've been using the following doctype for my website:
>
><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
> www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>
> When I use the W3 validator I get 17 errors, but the good news is that
> they are all easy to fix.
>
> However with their tool, I have the option to select xhtml1-strict.dtd
> and this time I get 28 errors. Some of them are not so easy to fix.
>
> My question is, what doctype should I use anyway ? Ive been using
> transitional.dtd only because my IDE (Visual Studio) added this one
> for me and I never really thought about it until I decided to validate
> my pages.
>
> Thanks
>


You should be using HTML Strict.

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share


cwdjrxyz 05-11-2010 04:03 PM

Re: What doctype should I use ?
 
On May 11, 10:11*am, Adrienne Boswell <arb...@yahoo.com> wrote:
> Gazing into my crystal ball I observed graphicsxp
> <graphic...@googlemail.com> writing in news:314b24e2-2902-411f-b20d-
> 9c4b7fbb9...@k2g2000yqe.googlegroups.com:
>
>
>
> > Hi,

>
> > I've been using the following doctype for my website:

>
> ><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
> >www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

>
> > When I use the W3 validator I get 17 errors, but the good news is that
> > they are all easy to fix.

>
> > However with their tool, I have the option to select xhtml1-strict.dtd
> > and this time I get 28 errors. Some of them are not so easy to fix.

>
> > My question is, what doctype should I use anyway ? Ive been using
> > transitional.dtd only because my IDE (Visual Studio) added this one
> > for me and I never really thought about it until I decided to validate
> > my pages.

>
> > Thanks

>
> You should be using HTML Strict. *


I agree. And notice this is html 4.1 strict and not xhtml 1 strict.
Any kind of xhtml will be served only as ordinary html unless you
configure your server to serve true xhtml. This might involve
associating the mime type for xhtml with an extension such as .xhtml
since .html usually is used for ordinary html. When you serve xhtml
properly, you will find IE browsers can not handle it. Thus you must
do some elaborate jumps through hoops to get IE to view the xhtml
page. One way is to use header exchange to see if the browser will
accept xhtml. If not, the page is rewritten as html 4 strict using
regular expressions etc. Unless you are on a private network that does
not use IE browsers, using true xhtml served properly is a lot of
work. The main problems are setting up the server and writing the
mentioned header code. Once that is done, serving true xhtml is not
very difficult. Also note that when served properly, an xml parser is
used that tolerates nearly no errors. A single error such as not
closing something often will give an error message from the xml parser
rather than a view, perhaps somewhat distorted, of the page.

Jukka K. Korpela 05-11-2010 04:04 PM

Re: What doctype should I use ?
 
Adrienne Boswell wrote:

>> My question is, what doctype should I use anyway ? Ive been using
>> transitional.dtd only because my IDE (Visual Studio) added this one
>> for me and I never really thought about it until I decided to
>> validate my pages.

[...]
> You should be using HTML Strict.


I can't agree without knowing the intrinsics of the tool used. It depends on
what kind of markup it generates and whether it lets the author to select
doctype (instead of forcing him to change it manually using another
program).

Then again, we might ask why someone using a bulky and costly program for
web page creation should additionally need to use a simple free checker to
verify that the generated code is valid...

--
Yucca, http://www.cs.tut.fi/~jkorpela/


graphicsxp 05-12-2010 09:58 AM

Re: What doctype should I use ?
 
Thanks for the answers.

My pages are now valide using xhtml1-transitional. But according to
you, I should validate it with strict mode. I'll work on it, but I
doubt it's possible.

Jukka, the reason I use a free tool, is simply because at design time
my aspx pages are not rendered as html yet. So it needs to be done at
runtime, which to my knowledge VS doesn't do. Besides it's not costly
depending on which version you use. Just saying:)

Athel Cornish-Bowden 05-12-2010 04:59 PM

Re: What doctype should I use ?
 
On 2010-05-12 11:58:38 +0200, graphicsxp <graphicsxp@googlemail.com> said:

> Thanks for the answers.
>
> My pages are now valide using xhtml1-transitional. But according to
> you, I should validate it with strict mode. I'll work on it, but I
> doubt it's possible.
>
> Jukka, the reason I use a free tool, is simply because at design time
> my aspx pages are not rendered as html yet. So it needs to be done at
> runtime, which to my knowledge VS doesn't do. Besides it's not costly
> depending on which version you use. Just saying:)


The cheapest version listed at
http://www.microsoft.com/visualstudio/en-us/products is offered at 799
USD. That seems pretty costly to me, but maybe you've more money than
you need.

However, I doubt if Jukka was wondering why you used a free product to
validate your HTML. Probably he was wondering why anyone would use an
expensive tool to generate HTML that couldn't be assumed to be
error-free. I haven't used any of these tools since about 1997, but
what I read about them suggests that they still cannot be trusted. In
view of the name of the company that produces Virtual Studio I'd be
very surprised if it is the exception.

--
athel


Athel Cornish-Bowden 05-12-2010 08:35 PM

Re: What doctype should I use ?
 
On 2010-05-12 20:39:56 +0200, Sherm Pendley <spamtrap@shermpendley.com> said:

> Athel Cornish-Bowden <athel_cb@yahoo.co.uk> writes:
>
>> On 2010-05-12 11:58:38 +0200, graphicsxp <graphicsxp@googlemail.com> said:
>>
>>> Jukka, the reason I use a free tool, is simply because at design time
>>> my aspx pages are not rendered as html yet. So it needs to be done at
>>> runtime, which to my knowledge VS doesn't do. Besides it's not costly
>>> depending on which version you use. Just saying:)

>>
>> The cheapest version listed at
>> http://www.microsoft.com/visualstudio/en-us/products is offered at 799
>> USD. That seems pretty costly to me, but maybe you've more money than
>> you need.

>
> It's not costly *depending on which version you use*. Since 2005 (IIRC)
> there has been an "Express" that's a free download:
>
> <http://www.microsoft.com/express/Web/>


I thought that might be the case, but ...
>
> I *still* don't think it's worth the price though. ;-)


.... more important, I agree with you. They'd need to pay me (at least
799 USD per page) to use it.


--
athel


graphicsxp 05-12-2010 08:43 PM

Re: What doctype should I use ?
 
well obviously you're not going to use Visual Studio if you only do
web page design.... It's all relative...
I do .net programming, including wpf applications, web services and
asp.net websites. So I really don't see what other tool I could
use :)
let's be objective a little bit, VS is definitely a great IDE when
you're into programming (not for graphics design)

thanks for all the replies.

Jenn 05-12-2010 08:53 PM

Re: What doctype should I use ?
 
graphicsxp wrote:
> well obviously you're not going to use Visual Studio if you only do
> web page design.... It's all relative...
> I do .net programming, including wpf applications, web services and
> asp.net websites. So I really don't see what other tool I could
> use :)
> let's be objective a little bit, VS is definitely a great IDE when
> you're into programming (not for graphics design)
>
> thanks for all the replies.


I like Photoshop for graphics design.. and Bryce 3d just for fun.

--
Jenn (from Oklahoma)
http://pqlr.org/bbs/



Beauregard T. Shagnasty 05-12-2010 09:57 PM

Re: What doctype should I use ?
 
Jenn wrote:

> I like Photoshop for graphics design.. and Bryce 3d just for fun.


Photoshop is fine for "make pretty." Expensive. The GIMP is free.

But you still don't know what a DOCTYPE is.

--
-bts
-Four wheels carry the body; two wheels move the soul


All times are GMT. The time now is 09:37 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.