views:

130

answers:

6

What is W3C officially recommended HTML and CSS version, for web development?

Is it XHTML 1.1 and CSS 3?

A: 

The latest HTML and CSS versions to reach Recommendation status are HTML 4.01 and CSS 2.0.

XHTML 1.1 has also reached Recommendation status, but the hoops you have to jump though to make it HTML compatible (required for IE support) combined with the benefits offered over HTML 4.01 mean that it should be avoided by most authors.

CSS 2.1 has reached Candidate Recommendation status, but should be used instead of CSS 2.0 because it better reflects what browsers actually do. CSS 2.0 reached recommendation status before the rules were changed to require 2 independent, interoperable implementations of a specification before it could advance to Recommendation status.

CSS 3 is a group of specifications, not a specification in its own right. A number of them have reached Candidate Recommendation status, but support is nowhere near as wide as for CSS 2.1.

David Dorward
CSS 2.1 is only [candidate recommendation](http://www.w3.org/TR/CSS2/), not recommendation.
Mark Trapp
I heard XHTML 1.0 Strict is the most recommended version to use by W3C, is it true?
metal-gear-solid
@metal-gear-solid — no, nothing is "most" recommended. The same provisos to XHTML 1.1 apply to XHTML 1.0.
David Dorward
Are HTML 5 and CSS3 not controlled by W3C?
metal-gear-solid
HTML5 and CSS level 3 are controlled by the W3C (well, HTML5 is partially controlled by the W3C), but they are not finished. It takes years to decades for the W3C to fully recommend a spec.
Mark Trapp
CSS 3 is not, as my answer states, a Recommendation yet. HTML 5 being controlled by the W3C or not could be debated, but either way, it isn't expected to be a Recommendation for another decade.
David Dorward
The time taken to complete a spec has more to do with the time taken for people to completely implement it so it can be signed off.
David Dorward
@David Dorward you're right; "recommend" is a more appropriate word.
Mark Trapp
+4  A: 

HTML 4.01, XHTML 1.1, and CSS level 2 are all W3C Recommendations, as are earlier versions of each respective standard.

CSS level 2, revision 1 (i.e. CSS 2.1) is still a candidate recommendation, and CSS level 3 is still a working draft. The W3C provides a handy chart of its progress in CSS.

As you might be able to tell from the dates on the recommendations, the classification system the W3C uses is next to meaningless for real-world applications. You're better off referencing something like QuirksMode to make an informed choice about what technologies you want to use.

Mark Trapp
A: 
  • XHTML 1.1 has been a recommendation since May 31st 2001.
  • HTML 4.01 has been a recommendation since December 24th 1999
  • CSS 2.1 is actually not a proper recommendation, but a candidate recommendation. In practice most of the 2.1-spec is usable today. The 2.0 spec, however, is a proper recommendation.

As far as I know, W3C does not for instance recommend XHTML before HTML. Both of them are perfectly valid to use.

While we are really looking forward to use HTML5, the funny thing is it will probably not be an official recommendation before 2022. Again, in practice - most of it will probably be fully usable within not too long. Especially when IE9 is done (which it should be soon). The other browsers are implementing and updating the new specification every day.

Arve Systad
Is it true W3C recommends XHTML over HTML?
metal-gear-solid
@metal-gear-solid No, it does not. They are treated equally as W3C Recommendations.
Mark Trapp
Does W3C do not recommend to use CSS 3, Today?
metal-gear-solid
@metal-gear-solid W3C does not 'recommend' anything, that label is only a status of it's completeness as a standard (under their definitions), not whether we as web developers should be using it.
roryf
A: 

I don't think there is such a thing as the W3C 'officially recommended' versions for day-to-day usage per se, the W3C is only there to oversee the standardization of technologies (as someone mentioned, CSS 2.1 is still candidate recommendation, but we all use it). The naming of Recommendation and Candidate Recommendation are essentially useless to anyone outside the W3C, unless you're a browser manufacturer or maybe a tools developer.

The latest web standards coming out of the W3C currently, are HTML5 and CSS3. Both are very much in use today, despite what you might hear about 2022. These standards are modular, so browsers can focus on implementing a single module rather than the whole standard (which rarely happens in its entirety anyway). HTML5 is also designed to be completely backwards compatible, and it based on research about how people are actually using HTML today, not how browser manufacturers might want you to be using it.

This means you can use much of the standards now. Some common usages include:

the HTML5 doctype:

<!DOCTYPE html>

omitting type from link and script when you are using the defaults:

<link href="mystyles.css" />
<script src="myscript.css"></script>

In CSS3 you can use properties such as border-radius or box-shadow, browsers which implement these will get the effects and older ones will just see square corners and not know any different.

This means HTML5 and CSS3 are not all-or-nothing solutions, feel free to pick the new bits that work for you and use what you're used to for the rest, your markup will still be perfectly valid and work fine.

roryf
+2  A: 

W3C doesn't do any recommendations for what to use for web development. They specify standards and recommend browser authors to follow them.

Which standards you choose to use for web development depends on your audience and what their browsers can be expected to support, and also how important it is that all visitors can use all functions on the site.

So, there is no single set of standards that can be recommended for all kinds of web development.

Guffa
A: 

W3C Recommendation are

  • CSS1
  • HTML 4.01
  • XHTML1.1

Still in Working Draft stage are:

  • CSS3
  • HTML5

Source: http://www.w3.org/TR/

udo