xHTML question

Discussion in 'HTML & Website Design' started by FPForum, Nov 19, 2007.

  1. #1
    I made a simple test page in notepad with regular html and uploaded the file to my site, test.xhtml

    When I went to visit the link it prompted me to download the file and would not display it. Any idea what is causing this?? Does the host need to install something? What am I missing here?

    Thanks in advance!
     
    FPForum, Nov 19, 2007 IP
  2. KaniGT5

    KaniGT5 Active Member

    Messages:
    122
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #2
    xhtml is a successor to html, you want to use ".html" as your extension.
     
    KaniGT5, Nov 19, 2007 IP
  3. FPForum

    FPForum Notable Member

    Messages:
    4,172
    Likes Received:
    102
    Best Answers:
    0
    Trophy Points:
    225
    Digital Goods:
    2
    #3
    so you cannot name files .xhtml? If not, what exactly is the purpose of xhtml? Does it not display in IE, only firefox?

    Just kind of curious as to why .xhtml does not load in IE..is it supposed to? Thanks :)
     
    FPForum, Nov 19, 2007 IP
  4. KaniGT5

    KaniGT5 Active Member

    Messages:
    122
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #4
    in a nutshell : en.wikipedia.org/wiki/XHTML
     
    KaniGT5, Nov 19, 2007 IP
  5. DKameleon

    DKameleon Member

    Messages:
    29
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    38
    #5
    Your webserver is not configured for .xhtml processing.
    You need to add type (for Apache), for example:
    AddType text/html .xhtml
    Code (markup):
     
    DKameleon, Nov 19, 2007 IP
  6. FPForum

    FPForum Notable Member

    Messages:
    4,172
    Likes Received:
    102
    Best Answers:
    0
    Trophy Points:
    225
    Digital Goods:
    2
    #6
    thanks for the link KaniGT5. This is great for reading up and understanding more about xhtml but does not answer my question which is basically, I make a file..using this code for instance:
    I have uploaded it to my site, and went to that page mysite.com/test.xhtml

    when I get to that page using IE6, I am prompted to download the file, rather than display it..When visiting the site in FireFox, it displays fine..

    Any idea why it does that? Any idea how to get around that or fix that? is it even possible?

    Thanks in advance :)
     
    FPForum, Nov 19, 2007 IP
  7. FPForum

    FPForum Notable Member

    Messages:
    4,172
    Likes Received:
    102
    Best Answers:
    0
    Trophy Points:
    225
    Digital Goods:
    2
    #7

    Thanks for that info. Exactly what I was looking for..I will have the host check apache cuz it is a linux box :)
     
    FPForum, Nov 19, 2007 IP
  8. dancom96

    dancom96 Well-Known Member

    Messages:
    1,556
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    105
    #8
    *sigh*... That's not the reason, whether you use XHTML or HTML for the website, you must use the extension .html or .htm
    The difference is, XHTML is more strict, and neater than HTML, also the tags are different and many other things.
    HTML: <br> XHTML: <br /> (closes it self)

    HTML: <p>text<p>more text (P's not closed)
    XHTML: <p>text</p><p>more text</p> (P's are closed)

    HTML: <img src="whatever.gif"> XHTML: <img src="whatever.gif" alt="whatever" /> (closes it self, plus requires a alt attribute)
     
    dancom96, Nov 19, 2007 IP