{"id":130,"date":"2006-01-07T23:36:10","date_gmt":"2006-01-08T04:36:10","guid":{"rendered":"http:\/\/www.glendathegood.com\/blog\/?p=130"},"modified":"2006-01-07T23:37:38","modified_gmt":"2006-01-08T04:37:38","slug":"xhtml-10-strict-and-forms","status":"publish","type":"post","link":"http:\/\/www.glendathegood.com\/blog\/xhtml-10-strict-and-forms\/","title":{"rendered":"My XHTML 1.0 Strict Resolution"},"content":{"rendered":"<div class=\"imgdeco\"><img src=\"\/images\/bikini.jpg\" alt=\"\" \/><\/div>\n<p>XHTML 1.0 Strict is my new best friend.  Designing pages using this doctype is the perfect new year&#8217;s resolution to ensure that my site is slim and trim. <\/p>\n<p>So, we could get into the argument about whether HTML 4.01 Strict is better than XHTML 1.0 Transitional, but personally I think that argument is not worth having until you can tell me why you are not adopting the  W3C  standard of XHTML 1.0 Strict.  <\/p>\n<p>Here are the reasons I&#8217;m choosing XHTML 1.0 Strict:<\/p>\n<ol>\n<li>I want my web pages to be easily interpreted by any user agent whether it be a screenreader, a browser on a laptop or on a mobile phone.  XHTML&#8217;s cleaner and more stringent syntax is a language based on all that we&#8217;ve learned over the past 10+ years of the web.  It includes the power of XML to define date with the strength of HTML&#8217;s ability to display data.   Any coder can quickly see the advantage of having all tags closed, properly nested and well formed.<\/li>\n<li>But XHTML 1.0  isn&#8217;t good enough for me without the Strict.  What does Strict mean?  Clean separation of content from presentation.  This separation makes a web site modular and easier to maintain while drastically reducing page size. <\/li>\n<\/ol>\n<p>I&#8217;m beginning to think of my XTHML 1.0 Strict New Year&#8217;s resolution as a diet for my web sites.<\/p>\n<p>Only new trick I had to learn when moving from XHTML 1.0 Transitional to XHTML 1.0 Strict was how to get my forms to validate.  I had made the &#8220;old-fashioned&#8221; mistake of wrapping a &lt;div&gt; around my &lt;form&gt;.  I kept getting the following errors from the XHTML validator:<\/p>\n<blockquote>\n<ul>\n<li>\ndocument type does not allow element &#8220;label&#8221; here; missing one of &#8220;p&#8221;, &#8220;h1&#8221;, &#8220;h2&#8221;, &#8220;h3&#8221;, &#8220;h4&#8221;, &#8220;h5&#8221;, &#8220;h6&#8221;, &#8220;div&#8221;, &#8220;pre&#8221;, &#8220;address&#8221;, &#8220;fieldset&#8221;, &#8220;ins&#8221;, &#8220;del&#8221; start-tag.<\/li>\n<li>document type does not allow element &#8220;input&#8221; here; missing one of &#8220;p&#8221;, &#8220;h1&#8221;, &#8220;h2&#8221;, &#8220;h3&#8221;, &#8220;h4&#8221;, &#8220;h5&#8221;, &#8220;h6&#8221;, &#8220;div&#8221;, &#8220;pre&#8221;, &#8220;address&#8221;, &#8220;fieldset&#8221;, &#8220;ins&#8221;, &#8220;del&#8221; start-tag.<\/li>\n<\/ul>\n<\/blockquote>\n<p>Scratching head.  Huh?  What do you mean I can&#8217;t have a &#8220;label&#8221; and an &#8220;input&#8221; here?    Did you know that in XHTML 1.0 Strict the &lt;form&gt; tag can only contain block level tags?  This means that the &lt;input&gt; and &lt;label&gt; tags need to be wrapped in a block level tag within the &lt;form&gt; tag or you too will suffer the two errors listed above.  <\/p>\n<p>If you used to do this:<\/p>\n<div class=\"code\">\n<strong>&lt;div><\/strong><br \/>\n&lt;form &#8230;><br \/>\n&lt;label&#8230;> &#8230; &lt;\/label><br \/>\n&lt;input&#8230; \/><br \/>\n&#8230;<br \/>\n&lt;\/form><br \/>\n<strong>&lt;\/div><\/strong>\n<\/div>\n<p>To be XHTML 1.0 Strict you&#8217;ll need to do this:<\/p>\n<div class=\"code\">\n&lt;form &#8230;><br \/>\n<strong>&lt;div><\/strong><br \/>\n&lt;label &#8230;> &#8230; &lt;\/label><br \/>\n&lt;input &#8230; \/><br \/>\n&#8230;<br \/>\n<strong>&lt;\/div><\/strong><br \/>\n&lt;\/form>\n<\/div>\n<p>So, what is your new year&#8217;s resolution for your web site?  Will your code be ready for bikini season?<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"imgdeco\"><img src=\"\/images\/bikini.jpg\" alt=\"\" \/><\/div>\n<p>XHTML 1.0 Strict is my new best friend.  Designing pages using this doctype is the perfect new year&#8217;s resolution to ensure that my site is slim and trim. <\/p>\n<p>So, we could get into the argument about whether HTML 4.01 Strict is better than XHTML 1.0 Transitional, but personally I think that argument is not worth having until you can tell me why you are not adopting the  W3C  standard of XHTML 1.0 Strict.  <\/p>\n<p>Here are the reasons I&#8217;m choosing XHTML 1.0 Strict:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[8,4],"tags":[],"_links":{"self":[{"href":"http:\/\/www.glendathegood.com\/blog\/wp-json\/wp\/v2\/posts\/130"}],"collection":[{"href":"http:\/\/www.glendathegood.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.glendathegood.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.glendathegood.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.glendathegood.com\/blog\/wp-json\/wp\/v2\/comments?post=130"}],"version-history":[{"count":0,"href":"http:\/\/www.glendathegood.com\/blog\/wp-json\/wp\/v2\/posts\/130\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.glendathegood.com\/blog\/wp-json\/wp\/v2\/media?parent=130"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.glendathegood.com\/blog\/wp-json\/wp\/v2\/categories?post=130"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.glendathegood.com\/blog\/wp-json\/wp\/v2\/tags?post=130"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}