SitePoint Sponsor

User Tag List

Page 1 of 3 123 LastLast
Results 1 to 25 of 59
  1. #1
    SitePoint Evangelist
    Join Date
    Apr 2006
    Posts
    443
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Should I start with XHTML or HTML?

    Hello everone,

    3 months ago I wanted to start learning about web design, but I don't know from where should I start?

    - Do I need to learn HTML or I can jump quickly to XHTML and don't need to HTML?

    Please give me claer answer... if I don't need to learn HTML, so I don't need aslo to spend my time in something rubbish.

    with my best.

  2. #2
    SitePoint Zealot
    Join Date
    Jul 2008
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    They're not really that different. But I would suggest starting off with XHTML and CSS
    Last edited by cdsanchez; Aug 23, 2008 at 11:08.

  3. #3
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You need to learn HTML, since XHTML is nothing but a reformulation of HTML as an application of XML. If you look at the XHTML 1.0 specification, it doesn't explain much at all about the various element types and attributes. It just refers to the HTML 4.01 specification where everything is defined and explained.

    In fact, there is very little reason for you to learn XHTML at all, unless you're going to write very specific markup (e.g., using SVG or MathML). And you'll still need a solid foundation of HTML to understand what you're doing.

    So definitely start with HTML.

    Quote Originally Posted by DanSEO View Post
    They're not really that different.
    On the contrary. They are very, very different. Fundamentally different. They just happen to look alike a lot, which makes people believe they are the same. They are not.
    Birnam wood is come to Dunsinane

  4. #4
    SitePoint Evangelist Ed Seedhouse's Avatar
    Join Date
    Aug 2006
    Location
    Victoria, B.C. Canada
    Posts
    592
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I pretty much agree with AutisticCuckoo - there is at present very little reason to use xhtml, especially since IE can't really handle it if served as it is supposed to be served.
    Ed Seedhouse

  5. #5
    SitePoint Evangelist
    Join Date
    Apr 2006
    Posts
    443
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo View Post
    You need to learn HTML, since XHTML is nothing but a reformulation of HTML as an application of XML. If you look at the XHTML 1.0 specification, it doesn't explain much at all about the various element types and attributes. It just refers to the HTML 4.01 specification where everything is defined and explained.

    In fact, there is very little reason for you to learn XHTML at all, unless you're going to write very specific markup (e.g., using SVG or MathML). And you'll still need a solid foundation of HTML to understand what you're doing.

    So definitely start with HTML.


    On the contrary. They are very, very different. Fundamentally different. They just happen to look alike a lot, which makes people believe they are the same. They are not.

    Alrgiht, I am going to start with HTML.

  6. #6
    SitePoint Enthusiast
    Join Date
    Nov 2007
    Location
    Belgium
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Ed Seedhouse View Post
    I pretty much agree with AutisticCuckoo - there is at present very little reason to use xhtml, especially since IE can't really handle it if served as it is supposed to be served.
    any example, I code in xhtml and never had any troubles so my question is how would normal xhtml look like because I think I'm doing something wrong

  7. #7
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,017
    Mentioned
    53 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by slisebry View Post
    I code in xhtml and never had any troubles
    probably because you are serving your xhtml as text/html

    change your doctype to serve it as application/xhtml+xml and watch what IE does

    see the XHTML vs HTML FAQ

    r937.com | rudy.ca | Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  8. #8
    SitePoint Zealot c.t.c.'s Avatar
    Join Date
    Apr 2007
    Posts
    176
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by CS Geek View Post
    Hello everone,

    3 months ago I wanted to start learning about web design, but I don't know from where should I start?

    - Do I need to learn HTML or I can jump quickly to XHTML and don't need to HTML?

    Please give me claer answer... if I don't need to learn HTML, so I don't need aslo to spend my time in something rubbish.

    with my best.
    HTML or XHTML: Does it Really Matter? is a recent Sitepoint article that argues in favor of XHTML. HTML or XHTML is a personal choice and not as straightforward as the comments in this thread would lead you to believe. I respect everyone's comments here, and Tommy's FAQ (posted by r937) is great, but if you ask this question only on the Sitepoint forums you might be (incorrectly) led to believe that there is an industry-wide consensus on this debate, which is not the case.

  9. #9
    SitePoint Guru tictike's Avatar
    Join Date
    Apr 2008
    Location
    Canada
    Posts
    863
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by slisebry View Post
    any example, I code in xhtml and never had any troubles so my question is how would normal xhtml look like because I think I'm doing something wrong
    I once thought I knew xhtml and that the extent of the differences between html and xhtml was syntax strictness. That is, until I read the xhtml vs. html faq in this forum.

  10. #10
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by slisebry View Post
    any example, I code in xhtml and never had any troubles so my question is how would normal xhtml look like because I think I'm doing something wrong
    Try viewing my blog forcing XHTML in IE and you'll see how well IE handles XHTML.

    If you've never had any problems in IE, then you haven't used XHTML. As Rudy said, you've most likely served your XHTML markup as text/html, which means you're using invalid HTML. Nothing more, nothing less.

    Quote Originally Posted by c.t.c. View Post
    I respect everyone's comments here, and Tommy's FAQ (posted by r937) is great, but if you ask this question only on the Sitepoint forums you might be (incorrectly) led to believe that there is an industry-wide consensus on this debate, which is not the case.
    There's definitely no industry-wide consensus that HTML is preferable to XHTML. But that's because most people who write XHTML markup believe that it's a 'newer' and 'more strict' version of HTML, which it isn't.

    Served 'properly' it's not HTML at all (it just looks like it). Served as HTML it is HTML, not XHTML.

    There are quite a few (like the author of the article you referred to) who claim that there are some mysterious benefits of using XHTML markup while serving it as HTML. So far they've never managed to come up with any concrete evidence, though.
    Birnam wood is come to Dunsinane

  11. #11
    SitePoint Enthusiast
    Join Date
    Nov 2007
    Location
    Belgium
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by tictike View Post
    I once thought I knew xhtml and that the extent of the differences between html and xhtml was syntax strictness. That is, until I read the xhtml vs. html faq in this forum.
    oh crap, I learned it from http://www.w3schools.com/xhtml/default.asp so I thought it was xhtml well thanks for the head up, so that's just a more strict html syntax, right?

  12. #12
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,017
    Mentioned
    53 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by slisebry View Post
    so that's just a more strict html syntax, right?
    no, it's a completely different language

    r937.com | rudy.ca | Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  13. #13
    SitePoint Enthusiast
    Join Date
    Nov 2007
    Location
    Belgium
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    but the one I was talking about from http://www.w3schools.com/xhtml/default.asp is just a a more strict version of html because it's not the xhtml you guys describe, on the faq xhtml = xml. Right?

  14. #14
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,017
    Mentioned
    53 Post(s)
    Tagged
    2 Thread(s)
    no, it is the same xhtml we're talking about

    and it's not the same as html -- although it is very, very similar
    r937.com | rudy.ca | Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  15. #15
    SitePoint Enthusiast
    Join Date
    Nov 2007
    Location
    Belgium
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok last time so http://www.w3schools.com/xhtml/default.asp = the real xhtml?

  16. #16
    SitePoint Guru tictike's Avatar
    Join Date
    Apr 2008
    Location
    Canada
    Posts
    863
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by slisebry View Post
    Ok last time so http://www.w3schools.com/xhtml/default.asp = the real xhtml?
    It's real but without understanding the fundamental differences between xhtml and html you might think, after reading info from that link that xhtml is only more strict. Read xhtml vs. html faq. it's the third link down in the html forum.
    Last edited by tictike; Aug 24, 2008 at 13:18. Reason: edit

  17. #17
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,017
    Mentioned
    53 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by tictike View Post
    Read xhtml vs. html faq. it's the third link down in the html forum.
    we've already given the exact link to the FAQ twice

    if that isn't good enough, then the alternate directions ("third link down in the html forum") aren't gonna help either

    r937.com | rudy.ca | Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  18. #18
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by slisebry View Post
    Ok last time so http://www.w3schools.com/xhtml/default.asp = the real xhtml?
    Yes, it's the 'real' XHTML, but W3Schools conveniently gloss over the most important aspects and treat XHTML as some sort of HTML.

    And the XML syntax is not any more 'strict' than HTML syntax, just more consistent. A valid XHTML document and a valid HTML document can both be parsed unambiguously, even if the latter makes use of all the shorthand features that HTML allows (but XML doesn't) – such as omitted tags and minimised attributes.
    Birnam wood is come to Dunsinane

  19. #19
    Function Curry'er JimmyP's Avatar
    Join Date
    Aug 2007
    Location
    Brighton, UK
    Posts
    2,006
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Read the FAQ on the forums and this: http://www.hixie.ch/advocacy/xhtml
    James Padolsey
    末末末末末末末末末末末末末末末末末末末
    Awesome JavaScript Zoomer (demo here)
    'Ajaxy' - Ajax integration solution (demo here)

  20. #20
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by r937 View Post
    no, it's a completely different language

    Hmm, I thought it was the same language, just a different serialization.
    Simon Pieters

  21. #21
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    HTML is an application of SGML.
    XHTML is an application of XML (which is a subset of SGML).

    Are you saying that HTML and XML are the same thing?
    Birnam wood is come to Dunsinane

  22. #22
    SitePoint Enthusiast
    Join Date
    Nov 2007
    Location
    Belgium
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    btw thanks guys, I get it now

  23. #23
    SitePoint Wizard bronze trophy C. Ankerstjerne's Avatar
    Join Date
    Jan 2004
    Location
    The Kingdom of Denmark
    Posts
    2,692
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Just to sum up:
    XHTML is an application of XML, which is a subset of SGML, but not fully SGML, an application of which is HTML, which is not XHTML, unless the XHTML is served as HTML, in which case it is not XHTML or even an application of XML but HTML. Also, MathML is an application of XML, and can be used with XHTML, unless the XHTML is served as HTML, in which case the XHTML is HTML, with which MathML can not be used, because it is then no longer used as an application of XML.

    See how easy it is?
    Christian Ankerstjerne
    <p<strong<abbr/HTML/ 4 teh win</>
    <>In Soviet Russia, website codes you!

  24. #24
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo View Post
    HTML is an application of SGML.
    Only in theory.
    Quote Originally Posted by AutisticCuckoo View Post
    XHTML is an application of XML (which is a subset of SGML).
    Right.
    Quote Originally Posted by AutisticCuckoo View Post
    Are you saying that HTML and XML are the same thing?
    No. I'm saying that HTML and XHTML are the same abstract language, just with different serializations ("text/html" and XML, respectively).
    Simon Pieters

  25. #25
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by zcorpan View Post
    Only in theory.
    No, HTML is an application of SGML. The fact that all browsers are buggy does not change that.

    Quote Originally Posted by zcorpan View Post
    No. I'm saying that HTML and XHTML are the same abstract language, just with different serializations ("text/html" and XML, respectively).
    They have the same semantics, since XHTML1 is merely a reformulation of HTML4 as an application of XML, but the differences are more fundamental than just the serialisation (unless I misunderstand what you mean by that).

    XHTML allows you to use elements from other namespaces, for instance, which HTML does not. Although these aren't part of XHTML as such, I think it shows that there's more to this than just serialisation. You can't parse a generic XHTML document and re-serialise it as HTML without loss.

    And the way the two markup languages are parsed and the way errors are handled are also quite different, although the error handling isn't formally specified in HTML4. Again, there's more than just a syntactic issue of serialisation.
    Birnam wood is come to Dunsinane


Bookmarks

Posting Permissions

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