warlos — 2011-03-14T00:46:23-04:00 — #1
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?
xhtmlcoder — 2011-03-14T00:50:44-04:00 — #2
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.
felgall — 2011-03-14T02:01:32-04:00 — #3
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.
marknel — 2011-03-14T02:48:49-04:00 — #4
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
seam71 — 2011-03-14T04:23:32-04:00 — #5
HTML 5 is just in testing and developing. Before xhtml 1.0, you must know HTML 4, So HTML 4 Definitely should be first.
samanime — 2011-03-14T15:49:33-04:00 — #6
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.
dnordstrom — 2011-03-14T16:04:12-04:00 — #7
HTML 4.01 first and then HTML5.
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).
felgall — 2011-03-14T16:55:43-04:00 — #8
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.
system — 2011-03-14T17:00:44-04:00 — #9
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! :rofl:
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-xhtml-52/xhtml-vs-html-faq-393445.html.
felgall — 2011-03-14T17:22:57-04:00 — #10
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.
system — 2011-03-14T17:36:12-04:00 — #11
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:
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.
markbrown4 — 2011-03-14T19:18:40-04:00 — #12
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 [url=http://simplebits.com/publications/bulletproof/]SimpleBits ~ Bulletproof Web Design](http://www.sitepoint.com/books/html2/) 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,
system — 2011-03-14T19:38:40-04:00 — #13
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.
warlos — 2011-03-14T20:39:19-04:00 — #14
Thank you all for taking the time. You were very helpfull.
I will start by learning html 4.01
markbrown4 — 2011-03-14T20:58:48-04:00 — #15
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.
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.
felgall — 2011-03-14T21:19:53-04:00 — #16
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).
samanime — 2011-03-14T22:54:39-04:00 — #17
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.
felgall — 2011-03-15T02:21:50-04:00 — #18
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.
markbrown4 — 2011-03-15T02:55:45-04:00 — #19
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.
stormrider — 2011-03-15T05:07:18-04:00 — #20
I think Tommy does (When his site isn't broken)
next page →