xhtml extension required for xhtml file?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nickyeng
    Contributor
    • Nov 2006
    • 252

    xhtml extension required for xhtml file?

    I wanna know whether xhtml extension needed for xhtml file?

    if i have xhtml code in a file, can i save that file as index.html ?
  • Paks
    New Member
    • Dec 2006
    • 13

    #2
    You only have to save it as a .html-file and not under a special file name.

    The biggest difference between HTML and XHTML is:
    1) That XHTML is more case-sensitive and only want small letters.
    I.E: <p> instead of <P>
    2) <br> has turned into <br />
    3) XHTML is very distinct about the order of "nestled"-tags,
    which means FILO (first-in-last-out)
    I.E: <div> <i> <strong>some text</strong> </i> </div>
    instead of what was incorrectly accepted as OK in HTML:
    <div><i><strong > some text </i></strong></div>
    4) And the mandatory XHTML-file should at least contain this:

    Code:
    <!DOCTYPE Doctype goes here>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Some title</title>
    </head>
    <body></body>
    </html>
    Hope this was of some help, there's an simple introduction tutorial at w3schools:
    Sorry! We can't seem to find the resource you're looking for


    //Paks

    Comment

    • drhowarddrfine
      Recognized Expert Expert
      • Sep 2006
      • 7434

      #3
      You can save it as a html file. If you save it with a xhtml extension then it becomes a xml file and will be treated as such.

      Comment

      • pravinda
        New Member
        • Dec 2006
        • 23

        #4
        only thing is that go to http://www.w3.org and make you side valid for html then you can saved it as html no matter

        Comment

        Working...