SitePoint Sponsor

User Tag List

Page 1 of 3 123 LastLast
Results 1 to 25 of 59

Hybrid View

  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
    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.

  5. #5
    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

  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 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.

  9. #9
    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?

  10. #10
    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"

  11. #11
    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.

  12. #12
    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

  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
    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

  21. #21
    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

  22. #22
    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

  23. #23
    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 devin11 View Post
    From seo perspective learn Xhtml.
    what!!?? could you explain the reasons for this please?
    r937.com | rudy.ca | Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  24. #24
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,604
    Mentioned
    24 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by r937 View Post
    what!!?? could you explain the reasons for this please?

    There is no possible reason apart from a complete misunderstanding on what HTML and XHTML are.

    If you are someone who prefers consistency then learning XHTML first (including the extra rules in Appendix C that make the resultant code compatible with HTML) and then changing the doctype back to HTML and deleting the now unneeded slashes in the self closing tags will give you more consistent HTML because it means that the HTML tags that can optionally be left out but which are required in XHTML will always be there making your code easier to read. Of course you could always just code your HTML that way in the first place and get the benefits of consistent coding without having to pretend it is XHTML first.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  25. #25
    Function Curry'er JimmyP's Avatar
    Join Date
    Aug 2007
    Location
    Brighton, UK
    Posts
    2,006
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by devin11 View Post
    xhtml and css are core codes to optimize your website. Xhtml is advanced subject of html.From seo perspective learn Xhtml.
    I'm not being rude here but it seems that every thread we have a "search marketing" professional come in a make a totally inaccurate comment!

    As stated in numerous comments above no one of these two languages is more "advanced" than the other plus CSS/XHTML are both absolute necessities - I don't quite understand what you mean by "core codes to optimize your website"!

    AFAIK Search engines don't care which one you use (HTML/XHTML) as long as it's coded semantically and complies to the corresponding DTD.
    Last edited by JimmyP; Aug 25, 2008 at 13:24.
    James Padolsey
    末末末末末末末末末末末末末末末末末末末
    Awesome JavaScript Zoomer (demo here)
    'Ajaxy' - Ajax integration solution (demo here)


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
  •