RootsWeb.com Mailing Lists
Total: 1/1
    1. [FreeHelp] Other "boilerplate" html
    2. Charlie Carothers
    3. Date: Mon, 27 Feb 2012 12:47:24 +1300 From: "Barry Carlson" <barrycarls@gmail.com> Subject: Re: [FreeHelp] Other "boilerplate" html To: <freepages-help@rootsweb.com> Message-ID: <AEAF0A5BD33645ECB92E9B79483FE164@VirtualXP27465> Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Charlie, The following covers the points you raised, and more. HTML5 is much less restrictive and therefore easier to write than XHTML 1.0. No requirement to declare the namespace uri, e.g. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" with the doctype. No requirement to add type attributes to script and style elements - the browser determines the defaults itself. No requirement to add //<![CDATA[ etc. to included scripts or stylesheets for them to validate. No requirement to use a long doctype such as - <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - now where do I have to go to find that?! Even I can remember <!DOCTYPE html>. No requirement to choose to include or not include a DTD URI in the DOCTYPE (mentioned in the first point) and neither is there a requirement to choose between Transitional and Strict mark-up. Using HTML5 <!DOCTYPE html> gives you a Strict doctype that triggers full Standards mode. Quirks mode rendering by browsers is a thing of the past. A simple character set declaration - <meta charset="utf-8"> ** Use http://validator.nu designed simply to handle HTML5, and which is not constricted by confusing Document Type Declarations. XHTML frowned upon tags such as <embed> are permitted. Over-all the syntax is cleaner, with no requirement to self-close single tags such as <img>, <br>, <hr> etc.. and as well as hosting the new HTML5, it allows legacy browsers render all of the code "they understand" in Standards mode. Note: ** <meta charset="iso-8859-1"> is an option, but "utf8" covers everything that "iso-8859-1" does, and more. My challenge is; Take a valid XHTML 1.0 Strict page, change the doctype to <!DOCTYPE html> and remove the extraneous stuff from the <html> tag. Let me know if the page doesn't render exactly the same as previously. Barry Hi Barry, I'm not sure if the challenge was to me personally, but I accepted it anyway. :-) I changed to the much simpler !DOCTYPE html and also switched to utf-8. Just as you predicted, there was no observable difference using either Firefox 10.0.2 or IE 7. Admittedly my one website is rather simple at the moment, and is really just a sort of placeholder until I learn enough to flesh it out. I've not checked it with Chrome or any other browser. I had Chrome installed for a while, but removed it after I discovered it had installed a couple of processes without my permission. I gather that these run at startup and then just sit there forever taking up resources. :-( OK, not much in the way of resources, but the arrogance represented by software that does that just ticks me off. -- Later, Charlie C. In God We Trust!!!

    02/27/2012 12:34:00