SitePoint Sponsor

User Tag List

Page 1 of 6 12345 ... LastLast
Results 1 to 25 of 160

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Aug 2010
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question what to learn html 4.01 or html 5

    Hi I'm new to web design, and I would like to know what should I learn first.

    There is a lot to learn and I am a bit confused about where to begin.

    Should I start by learning html 4.01 or xhtml 1.0 or html5?

  2. #2
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    HTML4.01 without a doubt before you move onto XHTML. HTML5 is unfinished and still mainly non normative anyway. You need to be able to understand HTML 4.01 really before you can look at XHTML.

  3. #3
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,784
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Definitely HTML 4 first.

    We need to wait for IE8 to die out before XHTML will finally be usable.

    HTML 5 is even further away as there will probably be lots of changes before it is finished - plus since it will just add a few things to HTML 4 you'll need to know HTML 4 anyway in order to use HTML 5.
    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="^$">

  4. #4
    SitePoint Member
    Join Date
    Feb 2011
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    With html5 still in development and would be different when the final version is eventually released ,it would be wise to go with html 4.01

  5. #5
    SitePoint Member
    Join Date
    Mar 2011
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    HTML 5 is just in testing and developing. Before xhtml 1.0, you must know HTML 4, So HTML 4 Definitely should be first.

  6. #6
    SitePoint Wizard
    Join Date
    Dec 2003
    Location
    USA
    Posts
    2,582
    Mentioned
    29 Post(s)
    Tagged
    0 Thread(s)
    I would almost say you could skip XHTML 1.0 completely... almost.

    The difference between XHTML 1.0 and HTML 4.01 is almost non-existent. The only real difference (with the exception of a few elements like xmlns attribute) is that all elements in XHTML 1.0 must be closed, including single tag elements (meaning <br> becomes <br /> so it's self-closing). If all of your HTML 4.01 is validating, it'd take you all of 10 minutes to learn XHTML 1.0.

    Also, since HTML5 is largely HTML 4.01 with a few extra things (and a few deprecated things), learning HTML 4.01 will also give you 90% of HTML5.

    So, learn HTML 4.01 first. Once you've mastered that, start learning the new HTML5 elements.

  7. #7
    Non-Member
    Join Date
    Jun 2010
    Location
    47°27′35″N 26°18′0″E
    Posts
    1,789
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by samanime View Post
    I would almost say you could skip XHTML 1.0 completely... almost.

    The difference between XHTML 1.0 and HTML 4.01 is almost non-existent. The only real difference (with the exception of a few elements like xmlns attribute) is that all elements in XHTML 1.0 must be closed, including single tag elements (meaning <br> becomes <br /> so it's self-closing). If all of your HTML 4.01 is validating, it'd take you all of 10 minutes to learn XHTML 1.0. .

    Really?!

    Except probably the fact that, for example, in order to use inline svg, you need to use namespaces, a feature HTML 4.01 doesn't allow?

    Or probably the fact that XHTML 1.0 has oh, I don't know, "slightly" different DTD and validation rules?

    Yeah, the singular, most important difference between HTML 4.01 and XHTML 1.0 is the self closing tag! Right!


    Using the coding style of XHTML, doesn't really mean you're coding XHTML, it only means you're simulating that. If only for closing tags, XHTML would be a something out of a clothing designer mind, not a developer' mind.

    Others have explained better the differences. And it happened right here, on SPF: http://www.sitepoint.com/forums/html...aq-393445.html.

  8. #8
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,784
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by noonnope View Post
    the singular, most important difference between HTML 4.01 and XHTML 1.0 is the self closing tag
    No - the most important difference is that XHTML will be offered for download by IE8 and earlier because they don't understand it at all.

    The next most important difference if you serve it to a browser such as Firefox, Chrome, Safari, Opera, or IE9 which does understand it is that if you make any errors in your XHTML then the page will not display at all - browsers don't make any assumptions as to how to correct your code with XHTML the way they do with HTML and so a missing tag or one in the wrong place will not be corrected by the browser. Opinions differ as to whether this is a good or bad thing.
    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="^$">

  9. #9
    SitePoint Addict dnordstrom's Avatar
    Join Date
    Jul 2006
    Location
    Amsterdam
    Posts
    337
    Mentioned
    18 Post(s)
    Tagged
    0 Thread(s)
    Short Answer
    HTML 4.01 first and then HTML5.

    Long Answer
    I agree with most of the other people here. But really, they've removed number "5" from the "HTML5" these days, meaning it will be called simply "HTML" from now on. Just look at the doctype declaration. I'd say simply learn HTML—first make sure to learn the basics and then you can move on to the new HTML(5) features that aren't yet supported in all major browsers. The newer features are very interesting but HTML 4.01 is what's supported at the moment so that's what's most important for you to focus on. HTML(5) is more of an addition to the HTML standard than it is a new standard in itself (such as what XHTML was going to be before it was discontinued).
    Daniel Nordstrom. of. Nintera(ctive)
    -- Featured post: Part 2. Writing NI.JS JavaScript
    ----- Follow me on Twitter. Got project? Contact me.
    -------- SitePoint: Community GuidelinesBe A Great Member

  10. #10
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,784
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by dnordstrom View Post
    such as what XHTML was going to be before it was discontinued.
    XHTML hasn't been discontinued. Only XHTML 2.0 was discontinued - XHTML 1.0 and XHTML 1.1 are still valid standards and XHTML 5 is being developed alongside HTML 5..

    The only issue that XHTML 1.0 has is that we are still waiting for IE8 to die before it will be able to be used. Once IE8 does die off and everyone is using more modern browsers then XHTML 1.0 will become a perfectly practical alternative to HTML 4.01 and there will likely be a lot of people start using it.

    The HTML 5 standard has always had an XHTML variant XHTML 5 that has the same relationship to HTML5 as XHTML 1.0 has to HTML 4.01. Presumably with dropping the 5 from HTML 5 they have also dropped it from XHTML 5.
    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="^$">

  11. #11
    Non-Member
    Join Date
    Jun 2010
    Location
    47°27′35″N 26°18′0″E
    Posts
    1,789
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    felgall, please note the "Yeah, right" I put there, especially to outline the fact that what others have said about it being the "the only real difference" is wrong.

    What I'm saying in my post is exactly the opposite of what you quoted: there is so much more differentiating HTML from XHTML. For that, you should have quoted earlier posts:
    Quote Originally Posted by samanime View Post
    The difference between XHTML 1.0 and HTML 4.01 is almost non-existent. The only real difference (with the exception of a few elements like xmlns attribute) is that all elements in XHTML 1.0 must be closed, including single tag elements (meaning <br> becomes <br /> so it's self-closing).

    I'm surprised you didn't saw this one responding to dnordstrom.


    And it has nothing to do with IE playing along well or not. Nonetheless, IE will still understand and use namespaces, to some extend, in an XHTML document served as HTML.

  12. #12
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,107
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    I agree with dnordstrom,
    The differences aren't as important as people are making out - in fact the doctype means nothing.

    Learn HTML. But, feel free to use the HTML5 doctype.

    As dnordstrom was saying, HTML 5 is an addition to HTML4, not an entirely new version. Most of the new stuff is adding support for features needed by web applications so you won't need to touch the new stuff if you're just starting out and building simple web pages.

    You'll be learning HTML regardless of what doctype you use. The tags and attributes are shared between the versions. Don't worry about the differences.
    Build Your Own Web Site The Right Way Using HTML & CSS, 2nd*Edition - SitePoint Books and SimpleBits ~ Bulletproof Web Design are great books that will explain things well and point you in the right direction.

    --
    It's just one of those topics that everyone loves to go on.. and on.. and on about, but truly, it simply doesn't matter.
    It's like asking developers which is the best code indentation - 2 spaces or tabs.

    All the best,

  13. #13
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,784
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by markbrown4 View Post
    Learn HTML. But, feel free to use the HTML5 doctype.
    That's the short version of the HTML 2 doctype so it is valid for any version of HTML except HTML 1 (wwhich doesn't permit a doctype at all).
    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="^$">

  14. #14
    Non-Member
    Join Date
    Jun 2010
    Location
    47°27′35″N 26°18′0″E
    Posts
    1,789
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, HTML is nothing like XHTML, that's for sure.

    Saying that HTML 4.01 is not really different from HTML5, that may be true.

    The reverse though, is far from true. HTML5 in not an addition to HTML 4.01, but HTML 4.01 was made an addition to HTML5.

    Learning HTML 4.01 is a smart thing to do. But starting off HTML5 after learning HTML 4.01 will make for a lot of "unlearning". Learning XHTML 1.0 won't make it any better.

    Of course, that would be true for those passionate enough to call them self web devs. For the rest of coders wannaby, any HTML would do. Is not that they can tell the differences anyway.

    And this is a topic that should shout loud and clear: IT MATTERS WHETHER YOU LEARN HTML 4.01 OR XHTML 1.0 OR HTML5. 'Cos it does. The web is full off coding simulators as it is. No need for SPF to help thickened them lines.

  15. #15
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,107
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by noonnope View Post
    Well, HTML is nothing like XHTML, that's for sure.

    Saying that HTML 4.01 is not really different from HTML5, that may be true.

    The reverse though, is far from true. HTML5 in not an addition to HTML 4.01, but HTML 4.01 was made an addition to HTML5.

    Learning HTML 4.01 is a smart thing to do. But starting off HTML5 after learning HTML 4.01 will make for a lot of "unlearning". Learning XHTML 1.0 won't make it any better.

    Of course, that would be true for those passionate enough to call them self web devs. For the rest of coders wannaby, any HTML would do. Is not that they can tell the differences anyway.
    I don't relate to your arguments at all. I'm more interested in this stuff than most - I still see the differences as negligible. Learning HTML5 hasn't meant any "unlearning" for me.
    My HTML contains tags / attributes and text, that's it.
    Quote Originally Posted by noonnope View Post
    And this is a topic that should shout loud and clear: IT MATTERS WHETHER YOU LEARN HTML 4.01 OR XHTML 1.0 OR HTML5. 'Cos it does. The web is full off coding simulators as it is. No need for SPF to help thickened them lines.
    No it doesn't Browsers will always understand HTML.
    Syntax doesn't matter, as long as it's consistent with a standard.
    Doctypes don't matter.

  16. #16
    SitePoint Member
    Join Date
    Aug 2010
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you all for taking the time. You were very helpfull.

    I will start by learning html 4.01

  17. #17
    SitePoint Wizard
    Join Date
    Dec 2003
    Location
    USA
    Posts
    2,582
    Mentioned
    29 Post(s)
    Tagged
    0 Thread(s)
    The only practical difference that most people see between XHTML 1.0 and HTML 4.01 is the self-closing tags.

    Yes, behind the scenes there are many differences... but for a beginner if you self-close your tags you can write perfectly valid XHTML... even if you aren't fully utilizing it.

    Likewise, if you know HTML 4.01, you don't have to master HTML5, you can slowly add on new elements. However, the converse isn't necessarily true. If you start off with HTML5, you won't really know what things are "new", and thus won't be able to easily target older browsers which don't support all of the HTML5 elements.

    It's helpful to keep your audience in mind when responding. A beginner is unlikely to be using SVG or anything like that, because it's not fully supported by all commonly used browsers yet.

  18. #18
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,784
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by samanime View Post
    The only practical difference that most people see between XHTML 1.0 and HTML 4.01 is the self-closing tags.
    That's a cosmetic difference and not a practical one. That XHTML will not display in IE8 or earlier and will not display if there are any errors are practical differences.

    If you serve the code as HTML then it is HTML regardless of what the doctype says and whether you use self-closing tags. It is only XHTML if you serve it as XHTML.
    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="^$">

  19. #19
    SitePoint Wizard silver trophybronze trophy Stormrider's Avatar
    Join Date
    Sep 2006
    Location
    Nottingham, UK
    Posts
    3,133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by felgall View Post
    That's a cosmetic difference and not a practical one. That XHTML will not display in IE8 or earlier and will not display if there are any errors are practical differences.
    Differences in how it is used, yes, but this is about learning them. When learning them, self closing the tags is the most important thing to remember. When using them, you must remember the correct mime type (a simple thing) and bear in mind a few facts about error checking / validation in XML (not so much a hard thing to learn, but just something to be aware of).

  20. #20
    Non-Member
    Join Date
    Jun 2010
    Location
    47°27′35″N 26°18′0″E
    Posts
    1,789
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by samanime View Post
    The only practical difference that most people see between XHTML 1.0 and HTML 4.01 is the self-closing tags.

    [...]

    It's helpful to keep your audience in mind when responding. A beginner is unlikely to be using SVG or anything like that, because it's not fully supported by all commonly used browsers yet.
    I've heard that the only practical difference most people see between Mars and Earth is the athmosphere.


    Quote Originally Posted by markbrown4 View Post
    My HTML contains tags / attributes and text, that's it.
    [...]
    Browsers will always understand HTML.
    Syntax doesn't matter, as long as it's consistent with a standard.
    Doctypes don't matter.
    This thread is becoming somewhat of a joke. Saying html is always html for browsers is the dumbest thing one can provide as teaching advice.

    What tags does your html have? What attributes? Are you sure they are understood by browsers? There are html standards old as granny browsers don't support well even today.

    Browsers do treat differently XHTML 1.0 from HTML 4.01 and from HTML5. Hell, many don't even handle XHTML well, not to mention many don't have HTML5 implemented yet.

    And don't come and tell me now XHTML 1.0 and HTML5 are not html! DTD does matter. You're stumbling about in technical implementations and mix them up with specifications.




    Quote Originally Posted by markbrown4 View Post
    I don't relate to your arguments at all. I'm more interested in this stuff than most - I still see the differences as negligible. Learning HTML5 hasn't meant any "unlearning" for me.
    Yeah, I've heard about this speed course in HTML5. You change your doctype to
    Code:
    <!DOCTYPE HTML>
    et violá, another HTML5 savvy out the assembly line.

    There is so much semnatic mixup in HTML5, as oppossed to HTML 4.01, and we are arguing years over properly learning HTML 4.01. Guess how long HTML5 would take to PROPERLY learn? Certainly not a week-end, since now there are two specs for HTML5, and these two don't say the same thing always.


    But I see what you and samanime are saying: any beginner should just start throwing tags in a text file, and the damn browsers better do something good about it, or else they'll complain and ***** and come to SPF forums for somebody to do the job for them learning nothing in the process.

  21. #21
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,107
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    Isn't it just easier not ever mentioning what "True XHTML" is?
    No one serves their XHTML as XML do they?

    I find the whole argument moot.

  22. #22
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,784
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by markbrown4 View Post
    Isn't it just easier not ever mentioning what "True XHTML" is?
    No one serves their XHTML as XML do they?

    I find the whole argument moot.
    Why would you serve XHTML as XML? Even though all versions of IE do support it being served that way it makes even less sense to do so than it does to serve it as HTML since you lose all the benefits of using a web based arrangement if you do that.

    As long as you are prepared to ignore IE8 and earlier you can serve XHTML as XHTML rather than as HTML or XML and get all the benefits that provides.

    The type of page is determined by the MIME type and not the doctype. You can use an XHTML doctype and serve the page as HTML or XML and you effectively just have malformed HTML that the browsers will fix or XML that needs all the extra things any XML does to display properly. XHTML only works properly as XHTML if you give it the XHTML MIME type and the only problem with doing that is that IE8 and earlier do not understand that one and so offer the file for download.

    XHTML will become practical once IE8 dies and the benefits that it will provide should see a lot of people switch to using it at that time.
    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="^$">

  23. #23
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,107
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by felgall View Post
    XHTML will become practical once IE8 dies and the benefits that it will provide should see a lot of people switch to using it at that time.
    What benefits?

  24. #24
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,784
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by markbrown4 View Post
    • Learn HTML - Either HTML 4 strict / or XHTML 1.0 strict - it doesn't matter.
    If you are going to serve it as HTML them it doesn't matter which of those two doctypes you use as it will still be HTML 4 that you are using. Only if you serve XHTML 1.0 as XHTML is it different - and then there are lots more differences than just a few extra /.

    Quote Originally Posted by markbrown4 View Post
    What benefits?
    Just one example: XHTML will let you know if you have made an error in the XHTML by not displaying the page. That way you can make sure the error if fixed before you upload the page to the web. You always know that your XHTML on the web is valid and so don't need to hope that all browsers will handle anything that is invalid the same way.
    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
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,107
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by felgall View Post
    Just one example: XHTML will let you know if you have made an error in the XHTML by not displaying the page. That way you can make sure the error if fixed before you upload the page to the web. You always know that your XHTML on the web is valid and so don't need to hope that all browsers will handle anything that is invalid the same way.
    Most people would see that 'feature' of XHTML as a drawback.

    I was really surprised you said that many people would start to see the benefits of XHTML when IE 8< is dead. I thought serving pages as XHTML died a long time ago.


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
  •