www.webdeveloper.com
Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 36

Thread: HTML or XHTML?

  1. #16
    Join Date
    Nov 2004
    Posts
    23
    I read (but didn't fully understand) the W3C FAQs on HTML and XHTML. If I understand what I read, my static web pages, that use CSS, Javascript and simple forms, and aren't complicated web applications, are better if written as HTML 4.01 Strict. I could use XHTML 1.0, but there's no advantage.

    XHTML 1.1 and 2.0 sound exciting with the XML features I can add, but how easy is it to use? How do I specify a file's mime type? Is it the file extension or server that does the work?

  2. #17
    Join Date
    Jul 2005
    Location
    USA
    Posts
    3,910
    Quote Originally Posted by krousen56
    XHTML 1.1 and 2.0 sound exciting with the XML features I can add, but how easy is it to use?
    Basically, XHTML 1.1 is just a modularized version of XHTML 1.0 Strict.
    XHTML 2.0 is still in development.

    Quote Originally Posted by krousen56
    How do I specify a file's mime type?
    That depends on the web server. Web servers do handle that automatically for common mime-types, though.

    Quote Originally Posted by krousen56
    Is it the file extension or server that does the work?
    I'm not sure what you mean.
    Server-side languages, like PHP and ASP, can override the default mime-type. Otherwise, the server sends whichever mime-type is associated with the file's extension.
    Learn CSS. | SSI | PHP includes | X/HTML Validator | CSS validator | Dynamic Site Solutions

    Design/program for Firefox (and/or Opera), apply fixes for IE, not the other way around.

    Check out my blog.

  3. #18
    Join Date
    Nov 2004
    Posts
    23
    I don't mean to be a pest, and please for give my ignorance. But what I mean by adding an extension is if I make a document XHTML 1.1, will it need a ".xml", ".xhtml" or ".html" file extension?

    I'll need to look up what modular means and how to take advantage of it.

  4. #19
    Join Date
    Jun 2004
    Location
    48°46′36″ N 9°10′48″ E
    Posts
    3,747
    *.html or *.htm

  5. #20
    Join Date
    Nov 2004
    Posts
    23
    Now I'm confused. If XHTML 1.1 can't be a text/html mime type, doesn't a file extension of ".html" or ".htm" say it is?

  6. #21
    Join Date
    Nov 2002
    Location
    XYZZY - UK
    Posts
    1,760
    The extension means nothing it's the MIME: http://www.xhtmlcoder.com/beck/ uses *.xht and serves XHTML to Appropriate browsers (ignore that fact I am not doing full content-negation), as do any of the files I have ending in *.htm or *.php on my server, you could even have *.dog and it could be XHTML.

    XHTML 1.1 SHOULD be served as application/xhtml+xml and yes both Opera and the latest Firefox do support SVG.
    Last edited by Robert Wellock; 10-19-2005 at 11:12 AM.

  7. #22
    Join Date
    Mar 2005
    Location
    Sydney, Australia
    Posts
    7,974
    Quote Originally Posted by Charles
    1) The W3C, being a non-governmental agency, sets no standards.
    There are over 200 governments in the world and probably hundreds of agencies for each. Rather than having thousands of Government agencies setting different standards for the web the various companies that create web browsers got together to create the W3C to set the standards for the web. All of the browser makers as well as other interested parties are all involved in setting these standards.

    No one except the W3C can set web standards because only the W3C has the support of all of the browser makers in defining what the standards should be.
    Stephen

  8. #23
    Join Date
    Nov 2004
    Posts
    23
    Fantastic Robert! Thank you. I started reading O'Rielly's "HTML and XHTML: the definitive guide" to better understand xhtml. If you have any sources or books you can point me to, I'd appreciate it.

  9. #24
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    Quote Originally Posted by felgall
    There are over 200 governments in the world and probably hundreds of agencies for each. Rather than having thousands of Government agencies setting different standards for the web the various companies that create web browsers got together to create the W3C to set the standards for the web. All of the browser makers as well as other interested parties are all involved in setting these standards.

    No one except the W3C can set web standards because only the W3C has the support of all of the browser makers in defining what the standards should be.
    Please, then, direct me to a standard that is set by the W3C.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  10. #25
    Join Date
    Sep 2004
    Location
    At the corner of WALK and DONT WALK
    Posts
    1,715
    Quote Originally Posted by Charles
    Actually, your close to the real truth about XHTML. Take a close look at the specification. It's not XHTML 1.0, it's XHTML™ 1.0.
    Is XHTML proprietary, then?

  11. #26
    Join Date
    Apr 2003
    Posts
    240
    No, XHTML is not a proprietary standard.

    As for bashing XHTML, I use it in all my projects. Though I use XHTML 1.0 Transitional, and serve it up wtih the text/html type. As long as you are using the ISO-8859-1 encoding type, even Netscape 4 will render it perfectly.
    We are Linux, you will be assimilated, you will be liberated, you will be confused by our version numbers and installation procedures, resistance is futile...

    Trying to optimize a Web page/site for a particular browser is like trying to optimize Tokyo for Godzilla. It's just not going to work.

  12. #27
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    Quote Originally Posted by Albatross
    As long as you are using the ISO-8859-1 encoding type, even Netscape 4 will render it perfectly.
    And as long as you follow 17 other restrictions, yes. But that's not XHTML it's XHTML + HTML and if you're going to so that then why not just use HTML?
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  13. #28
    Join Date
    Apr 2003
    Posts
    240
    It's a personal preference, really. Not to mention that it's easy to switch to 1.1 later on without having to go back and close empty tags (like IMG) afterword.

    Only thing I would have to remove are target attributes (like target="_blank") should I choose to upgrade. That and changing the DOCTYPE.
    We are Linux, you will be assimilated, you will be liberated, you will be confused by our version numbers and installation procedures, resistance is futile...

    Trying to optimize a Web page/site for a particular browser is like trying to optimize Tokyo for Godzilla. It's just not going to work.

  14. #29
    Join Date
    Nov 2005
    Posts
    2
    can anyone help me make a web page using html for a school project or tell me at least tell me the order of the codes and the codes show me an example send me the link for an example thats all i need to know thanks write back

  15. #30
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    Strictly speaking, all you need is
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
     "http://www.w3.org/TR/html4/strict.dtd">
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta name="Content-Style-Type" content="text/css">
    <title></title>
    but it is common to start with
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
     "http://www.w3.org/TR/html4/strict.dtd">
    <html lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta name="Content-Script-Type" content="text/javascript">
    <meta name="Content-Style-Type" content="text/css">
    <title></title>
    </head>
    <body>
    
    </body>
    </html>
    And read Mr. Raggett's fine tutorials on the subject. ( http://www.w3.org/MarkUp/Guide/ ) The venerable Mr. Raggett wrote the HTML 3.2 spec and worked on the 4.01 and gave us Tidy. We all owe this man very much.

    And lastly, make friends with The Validator ( http://validator.w3.org/ ).
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles