Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
  1. #16
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,437
    Thanks
    75
    Thanked 4,372 Times in 4,337 Posts
    HTML is not XML.

    You *can* have XHTML that is XML-compatible, though.

    But there are many rules in XML that are not necessarily followed in HTML.

    If you use XHTML in strict mode and validate it (say with the w3c validator) *then* you can probably treat it as XML for the purposes of this usage.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  2. #17
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Understood re: html not being xml. In terms of using xhtml, is there an easy way to convert an html file to an xhtml file?

  3. #18
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,437
    Thanks
    75
    Thanked 4,372 Times in 4,337 Posts
    Well, to begin with, all tags should be lower case. <td> instead of <TD>.

    And all properties MUST be enclosed in quotes, not apostrophes. <td class="whatever"> and not either <td class=whatever> or <td class='whatever'>.

    & should be written &amp; (because the & alone looks like the start of the &amp; entity), etc.

    Once you have converted the HTML, use the w3c validator to make sure it validates as strict XHTML.

    If you have any errors, it will tell you about them so you can easily fix them and try again.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


 
Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •