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 confusedabout where to begin.
Should I start by learning html 4.01 or xhtml 1.0 or html5?
| SitePoint Sponsor |
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 confusedabout where to begin.
Should I start by learning html 4.01 or xhtml 1.0 or html5?


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.
};-) http://www.xhtmlcoder.com/
Thinking Web: Voices of the Community
> March 2013 - SitePoint forums: Spot the Error 3: Calling all Sleuths! Winner Announced!... She knows how to spot simple <code> errors but do you?

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="^$">
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
HTML 5 is just in testing and developing. Before xhtml 1.0, you must know HTML 4, So HTML 4 Definitely should be first.





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.
Xazure.Net - My Blog - About Programming and Web Development
Follow Me on Twitter!
Christian Snodgrass





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.

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="^$">


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 Guidelines • Be A Great Member

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="^$">





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.

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,

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="^$">





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.

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'tBrowsers will always understand HTML.
Syntax doesn't matter, as long as it's consistent with a standard.
Doctypes don't matter.
Thank you all for taking the time. You were very helpfull.
I will start by learning html 4.01![]()





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.
Xazure.Net - My Blog - About Programming and Web Development
Follow Me on Twitter!
Christian Snodgrass

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="^$">

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





I've heard that the only practical difference most people see between Mars and Earth is the athmosphere.
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.
Yeah, I've heard about this speed course in HTML5. You change your doctype to
et violá, another HTML5 savvy out the assembly line.Code:<!DOCTYPE HTML>
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.![]()

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="^$">


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 /.
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="^$">

Bookmarks