Validating XHTML - Am I choosing the right doctype?

This is a discussion on "Validating XHTML - Am I choosing the right doctype?" within the Web Page Design section. This forum, and the thread "Validating XHTML - Am I choosing the right doctype? are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Sep 11th, 2007, 14:34
Junior Member
Join Date: Jul 2007
Location: devon, england
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Validating XHTML - Am I choosing the right doctype?

Hi,

I have just read this article:

http://webkit.org/blog/?p=68

...which, if I am reading it right, makes me think I have been using thr XHTML dictype incorrectly?

The code for my home page is:

Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- saved from url=(0014)about:internet -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>

<link rel="Shortcut Icon" href="http://www.webforumz.com/images/favicon.ico"/>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>eightyone design | dynamic design for print and web | paignton devon</title>
<script type="text/javascript" src="swfobject.js"></script>

<script type="text/javascript" src="popup.js"></script>


<link href="eightyone.css" rel="stylesheet" type="text/css" />
</head>
<body class="main-background">

    <div id="flashcontent">
      <div id="nonflashcontent">
        <p class="line-separation-bottom"><img src="http://www.webforumz.com/images/header-banner.gif" alt="welcome to eightyone design | dynamic design for print and web | paignton devon" width="717" height="116" /></p>
        <p class="line-separation-bottom"><span class="html_header_green">about us</span><br />
          eightyone is a small graphic design studio based in paignton, south devon. we specialise in innovative and dynamic design for print and web, and anything else we can get our hands on. our aim is to provide creative solutions to any brief, with enthusiasm and a friendly approach.</p>
        <p class="line-separation-bottom"><span class="html_header_green">our work</span><br />
            a selection of our work can be viewed on the flash version of our website. This requires Flash software which can be <a href="http://www.macromedia.com/go/getflashplayer">downloaded here</a></p>
        <p class="line-separation-bottom"><span class="html_header_green">latest news </span><br />
          please <a href="flash_content/eightyone-news.html">click here</a> for the latest news from eightyone design </p>
        <p class="line-separation-bottom"><span class="html_header_green">contact us </span><br />
          e. info@eightyonedesign.co.uk | t. (01803) 390859 | a. 3 honeysuckle close | paignton | devon | tq3 3pb</p>
        <p class="centeralign"> <span class="html_header_green">you do not have the latest version of adobe flash player</span><span class="html_text"><br />
        </span>our website makes use of adobe flash software. you have an older version of adobe flash player which cannot play the content we have created. why not <a href="http://www.macromedia.com/go/getflashplayer">download and install the latest version</a> now? it will only take a moment.</p>
      </div>
    </div>

    <script type="text/javascript">
        // <![CDATA[
        
        var so = new SWFObject("eightyone-main.swf", "eightyonemain", "737", "526", "8", "#FFFFFF");
        so.write("flashcontent");
        
        // ]]>
    </script>

<div class="justify" id="info">
<table width="100%" border="0" cellpadding="0" class="main_text">
  <tr>
    <td class="leftalign">email: <a href="mailto:info@eightyonedesign.co.uk">info@eightyonedesign.co.uk</a> | tel: (01803) 390859 </td>
    <td class="rightalign">&copy; 2007 <a href="http://www.eightyonedesign.co.uk">eightyone design</a> | dynamic design for print and web </td>
  </tr>
  <tr>
    <td><a href="javascript:popUp('eightyone-news.html')" class="leftalign">latest news from eightyone design</a> | <a href="http://eightyonedesign.blogspot.com">eightyone design blog </a></td>
    <td class="rightalign"><a href="http://validator.w3.org/check?uri=referer">XHTML 1.0 Strict </a> | <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></td>
  </tr>
</table>
</div>
</body>
</html>
...which validates as XHTMl 1.0 strict -= but on reading the article, I should be using a html 4.0 transitional doctype which does not validate? Am I doing what is stated in the article and thinking my XHTML is fine when it is actually html 4.0 transitional which does not validate?

I am very confused!!

Thanks for any help!

Steve

Last edited by karinne; Sep 11th, 2007 at 15:12. Reason: The HTML vbCode is not working properly so I changed it to the simple code one ;)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Sep 11th, 2007, 15:35
alexgeek's Avatar
Moderator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,812
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
Re: Validating XHTML - Am I choosing the right doctype?

So it works/looks correctly and validates,
but you're not convinced?
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Sep 11th, 2007, 15:44
Elite Veteran
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Validating XHTML - Am I choosing the right doctype?

You are 100% correct! *Gives standing ovation!*

The ultimate goal is to use XHTML Strict 1.0. If you can validate and code for that, you are doing great! HTML transitional is a doc type to use for the widest range of browsers including all the oldies. If you support the use of the old browsers then I suppose you'd be better off using html transitional. However if you are coding for nothing older than IE5, than you are on the right track. Keep it up!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Sep 11th, 2007, 16:27
Elite Veteran
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Validating XHTML - Am I choosing the right doctype?

Here's a great article that might help - Choosing the best Doctype for your website
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Sep 19th, 2007, 12:21
Highly Reputable Member
Join Date: Jul 2006
Location: Devon, England
Posts: 565
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Validating XHTML - Am I choosing the right doctype?

Quote:
However if you are coding for nothing older than IE5, than you are on the right track. Keep it up!
I bet it would only be a very small amount of users who are using browsers older than IE5 anyway so I would go with XHTML
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Sep 20th, 2007, 20:07
Most Reputable Member
Join Date: May 2007
Location: UK
Age: 27
Posts: 1,111
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Validating XHTML - Am I choosing the right doctype?

Quote:
Am I doing what is stated in the article and thinking my XHTML is fine when it is actually html 4.0 transitional which does not validate?

I am very confused!!
I'm not surprised you are confused. It's a complex and bizarre issue.

In practical terms, there's nothing wrong with using XHTML 1.0 Strict. Browsers should cope just fine with it. There are potential pitfalls, but they are quite specific and you probably won't encounter them.

Strictly speaking, however, browsers will interpret your XHTML as HTML (because you told them to do this, when you specified "text/html"). Since XHTML code does not validate as HTML, they will activate their error correction routines to work out how they should render your website.

This would be a big problem if their error correction routines were weak. But since their error correction routines are very strong -- they can cope with much nastier invalid code than yours -- you should be fine.

But if you want to be absolutely sure, use HTML 4.01 Strict.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
doctype

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
which doctype?? geyids Web Page Design 11 Mar 13th, 2008 02:18
which doctype? aflacduck Starting Out 19 Jun 17th, 2007 19:34
Doctype or no Doctype notagz1 Website Planning 6 Jun 16th, 2007 01:11
validating xhtml with ' &#39 rocket468 Web Page Design 3 Dec 31st, 2006 05:38
Doctype ahm531 Web Page Design 2 Sep 6th, 2006 07:55


All times are GMT. The time now is 18:49.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved