Should I use XHTML/CSS2 or HTML5/CSS3 on my blog project? - html

I'm going to develop a theme for a WordPress blog but I'm not sure if I should do it using XHTML/CSS2 or if I already can do it using HTML5/CSS3.
Usually, I use 960.gs framework but it isn't available with HTML5/CSS3. I've heard that the 52framework works fine as well and I'm thinking about adopt it for my project, but I'm really insecure about HTML5's early adoption (?).
Someone, please, can help me to decide which technology adopt on my project.
Thanks a lot.

HTML5 and CSS3 are "ready to use" - you need to learn a little about the concept of "Polyfilling", but you can make the user experience very similar in all browsers, even if you lose a few transition effects and rounded corners along the way.
My website has been HTML5 since 2009 and I tested it across many, many browsers.
So the bottom line is, HTML5 is designed to be highly backwards compatible with HTML4.01 and there are lots of techniques for making content available to older browsers that don't support the more funky elements in HTML5.

The 960 grid system will work with HTML5 and CSS3 because it's just a list of classes. CSS3 doesn't really give you any grid layout features yet that are widely adopted enough to be helpful.
I would use CSS3 and HTML5 as much as you can but don't forget about progressive enhancement. Don't blindly ignore a browser because it doesn't support CSS3. You should use HTML5 and CSS3 appropriately and not because it's cool.

What audience are you designing it for? Do you need to be bleeding edge?
I would say use XHTML/CSS2 as that will be supported for years unless you need the functionality in the others.
Being an early adopter can be quite painful, so only do that if you have good reasons to.

Html5 and css3 for sure!
The only thing you might want to ask yourself is wether or not you want to use the new elements (article, aside, nav etc.) Because if you do, you need to depend on Javascript in order for IE to render your page correctly.
Every new page should be written with the new doctype imo:
<!DOCTYPE html>
If you want a starting template that works well in all major browsers you might want to check this out: http://html5boilerplate.com/

Whole-heartedly agree with Bravax.
It's all really based on who your audience is. If you want your site to be on the bleeding edge, regardless of audience, go for it.
I have heard great things about 52framework! I am about to implement it into a full-on 100+ page site redesign. The good thing about it, is that it plays nice with IE (even 6!).

It is entirely related to the markets you are aiming at. You will be able to have more interactive content and easier to maintain styles with CSS3. This said, many of the html5 and css3 elements are not yet standardized. Even among the modern, cutting-edge, browsers there can be major differences.
If you are making a theme for experimental purposes or to play around with, I would go with the newer technologies.
If you are making this for consumption on a wide sale, and potential sale, you really should avoid technologies not supported by older browers, IE 7 and 8 especially.

Related

is box-shadow (CSS3) really not ready to use? (according to "CAN I USE")

I have a problem that I want you to help me, I am currently making a website, I am building that website on HTML5 and CSS3 technology, every feature I'd like to use I check it first in "CAN I USE", the technology I use most is box-shadow, and I already made some great things with it but, I have a doubt about the percentage of browser that don't support that technology, the percentage of browser that do not support box-shadow is around 17.12%, and if you see the conclusions (show options => other options => show conclusions) they say that that feature isn't ready yet because they are "Waiting for Opera Mini 5.0-6.0 to expire", I personally think that the best that we can do in order to make people update their browsers is not support older browser, but ...
am I right thinking like this?
will I have bad consecuences if I don't support older browsers?
is worth to work twice just to support older browsers?
should I still working with box-shadow?
As always....
Progressive Enhancement.
Build your site so it works well for everybody regardless of their browser settings and capabilities. Then add features that enhance the experience but don't cause the site to break for those who cannot take advantage of that feature.
Some CSS3 elements(shadow, rounded corners,...) will not work in older browsers. That's a fact, but you can still use them as the mentioned browsers simply ignore this attribute.
Best way would be that the design of the website doesn't rely on the shadow and other effects, but only to enhance it.
Also take into account the market share of the browsers that don't use these elements. Opera's got a tiny share on the desktop market, and a little bigger on mobile devices, but in no case is a major player. Pre 8 Internet Explorer will give you the most headaches...
I completely agree with John Conde,
Do you want to make a website to teach a lesson to people who still use old browsers?
Or are you seeking more visitors?
Start with a simple design that everybody could use, and then improve it for modern browsers while keeping old browsers in mind.

Is it time to switch for HTML5 and CSS3? [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Should i be using HTML5 and CSS3?
How do you decide if you need to use html5 and css3? and what will be the pros and cons in choosing that approach.
Pros and cons I can think of:
Pros:
cleaner codes
support for #font-face
shadows and rounded corner
animations
Cons:
not all browsers supports
Can you help me decide? How do you decide if you're in my situation?
Thanks!
It won't be time to switch to "HTML5 and CSS3" for a very long time indeed.
It is time to look carefully at the features added by HTML 5 and CSS 3 and decide, on a case by case basis based on:
Browser support
Consequences of using them in browsers that don't support them
Benefits gained
Fallback options available
… which specific features it is worth using today.
A well designed site should always degrade gracefully and both HTML and CSS support this. The goal should not be to make your look fantastic in older browsers - only to make your site USEABLE in older browsers. A well designed site should be useable with CSS turned off.
I think a clear YES can come only after the target browsers are compatible. However, if my target browser supports the specific features of HTML5 and my development is limited to these supported features, HTML5 can be used.
Some people still use browsers once used by the ancient egyptians, like IE6, and they will not be able to view your pages (and specifically new styles/tags).
If you have a public website, accessable to virtually anybody, I suggest waiting for at least a couple of years before the big convert.
If, on the other hand, you have a controllable group of users, like the intranet site I'm working on, you can easily enforce the use of more modern browsers that support this, like Google Chrome, Apple Safari, Mozilla Firefox, of Internet Explorer 9 (just released).
I believe it is entirely down to who you are targeting. If you are targeting developers, Stack Overflow for example, then I think you can use the new technologies. If you really need to display a message to upgrade then I am sure developers would understand.
You should not use it for general sites for something such as a shop which has a very wide audience. This is because a lot of them would be using IE 6 - 8. The fact that no one on XP (my whole office + pretty much everyone else I know) can upgrade to IE9 which supports some features is frustrating too.
So I don't think there will be a definitive day where everyone can use it. It is just a case of looking at the market share of browsers and your target audience and deciding if it is worth giving 99% of people a better experience and ignoring the other 1%. Although I am sure those figures are completely off, it is probably a lot worse.
In conclusion, it depends on your audience and if you are willing to not support a varying number of users.

Large eCommerce site: Is it time for HTML5?

I currently work for a large company and I design for their high-traffic ecommerce website. We support tens-of-thousands of users across a variety of browsers. Our current browser stats point to most people using either Firefox 3+ and IE8. There are about 5% of users still on IE6.
Is it time to start coding for the future and impliment HTML5 across the site? Is it a responsible thing to do or should I wait a year for people to upgrade to better supporting browsers?
Thank you.
HTML5 isn't one specific thing. You can start using it even in browsers that have no idea what HTML5 is. If you just start using some of the extra tags or form types, they degrade perfectly into standard elements in older browsers. Video needs a Flash fallback anyway. The advanced scripting features all need fallbacks for non-supporting browsers anyway, or must only add non-essential functionality.
In short, sure, start using HTML5 techniques now to provide advantages for cutting-edge browsers, just make sure it all degrades nicely in older browsers.
IE8 doesnt support most of HTML5.
There are libraries you can use to make it more HTML5 aware; but for a large production site I think your better of waiting a year.
I would say that the 5% of users still on IE6 will probably remain on IE6. They either aren't interested in upgrading (perhaps they don't know about these things), or are restricted to IE6 by security policies in their workplace. In particular I've found that a number of our clients are not upgrading from IE6 because their IT teams consider it to be too big a change, or their existing software is not compatible with anything else.
Therefore, my advice is: go HTML5. With a bit of work you can work around IE6's deficiencies (look at Modernizr, CSS3PIE for ideas). And that way, the other 95% of customers get a better experience.
... what is "large"? Considering HTML5 is still considered work in progress, I'd vote no.
The name "HTML5" is tending to be used by most people at the moment to describe all the exciting new features in web browsers. Not all of these features are actually part of the HTML5 spec - for example, CSS and Javascript have new features which are being referred to under the HTML5 banner. I'm going to assume you mean all these features.
My answer would be to investigate which features you can implement, but remain backward-compatible. Many of the features of HTML5, CSS3, etc can be added to your site without making it un-usable for older browsers.
Some examples: (but do spend time researching for more)
New input types, such as <input type='date'> and <input type='number'>These give you new features in a modern browser, but old browsers will still show a normal input field.
More info: http://www.456bereastreet.com/archive/201004/html5_input_types/
Semantic HTML5 tags, such as <section>, <footer>, etc.
These give you additional semantic meaning to your HTML tags, which is good for SEO and other automated systems that look at your site. They are broadly backward-compatible, though in order to support them in IE6/7/8, you will need to include an IE hack such as HTML5Shiv. However, I would suggest using Modernizr, which includes the HTML5Shiv plus a stack of other useful functionality.
Some CSS3 features such as border-radius. IE doesn't know about this, but the result is that IE will have square corners and other browsers will have rounded corners. So nothing that breaks the site for IE users.
But if you really want to, IE can be made to support a number of CSS3 features, including border-radius, using tools such as CSS3Pie.
Instead of using SVG graphics directly, use a Javascript graphics library such as Raphael, which will draw SVG in browsers that support it, and fall back to VML for IE (which will even work in IE6).
Obviously stuff like the <video> or <canvas> tags aren't going to work in older browsers, but frankly, it'll take you long enough just implementing the features you can use straight away; by the time you're ready to take a step further, things will have moved on anyway.

How important is it to support old browsers?

Just read an interesting article by yahoo's Nicholas C. Zakas: What’s a web browser?
How do you best balance implementing new technologies like HTML5 and CSS3 while keeping support for browsers like i.e 6, is it a practical approach to day to day web development where deadlines must be met?
I think it really depends on the type of site you are building as well as the type of intended end users. If you are building a site for a band, they tend to use a lot of flash/silverlight to make the interactions "cool" and more fluid. This would be an example of when to go all out with HTML5 and using canvas to accomplish some of the same effects. Obviously IE6 wouldn't work, but with more and more major companies dropping support for IE6 (Google included for gmail) it is becoming less and less of an issue as time passes.
If you need to develop a site where people will still heavily use IE6 then you might want to stay away from using the latest technologies. The pain you would go through to get things to work might not be worth it in the end especially if deadlines are tight and if you are not an expert.
Then there are the cases in the middle and here I think you need to think long and hard if you want to keep supporting IE6. I know a bunch of people who have dropped support and have found it much easier to strike the balance between CSS3 and HTML5 with the other browsers. It's still not perfect, but much easier to work with in the end.
It depends on your traffic and who is spending money on your site. For us, it's necessary to continue supporting IE6 because a not-insignificant amount of money is spent by those users, and we're not in a position to compel them to upgrade. (If they're spending time upgrading, they're not spending time spending.)
If your site is not commercial then you should have a lot more freedom in determining minimum browser requirements.
On one hand, the market isn't ready for HTML5 and CSS3-only sites. However, on the other hand, if at least a bit possible, one should avoid support for IE6 and older (see the IE6-no-more movement for inspiration) because it's good for the industry and the average internet population to get rid of obsolete and problematic technologies.
If you wish to create a modern website I.E. HTML5 then I would recommend you take a look at http://html5boilerplate.com/ If you look at this boilerplate you will notice they take advantage of the modernizr JavaScript file to bring HTML5 support to older browsers.
I also strongly recommend you read Aaron Gustafson's Understanding Progressive Enhancement The idea behind progressive enhancements is that your site will look the best if viewed in a browser that supports modern CSS and HTML5 selectors/features while still providing a baseline for legacy browsers. There is a follow up article to Progressive Enhancements that is also worth a read http://www.alistapart.com/articles/progressiveenhancementwithcss
It depends on you audience, doing HTML5 and CSS3 heavily is acceptable only when you are sure your users will use only modern browsers. ( never been so lucky yet )
For now, you can consider them only for progressive enhancements. That is, you make a site working fine in IE6, and then you add features like round borders/shadows , the <video> tag or speeding up the site using local storage just as a bonus for the wiser users.
I'm starting a big project in few weeks, and all I can do is to make it HTML5 ready using the right doctype, the new tags and the few lines of javascript that will make it compatible with the old browsers, but will not use any cool feature for now.

How to write backwards compatible HTML5?

I'd like to start using HTML5's basic features, but at the same time, keep my code backwards compatible with older browsers (graceful degradation). For instance, I'd like to use the cool CSS3 properties for making rounded corners. Is there any available tutorial for writing gracefully degradable HTML5 ?
Additionally, what browsers should I support so that my app. is functional for at least 95% of visitors? What are the ways to test those browsers painlessly ?
When talking about HTML5 or CSS3, you should head over to:
When can I use...
As can be seen, we are still far far away from using that.
Also, since old versions of the browsers won't support HTML5 or CSS3, however, you can do what is known as:
Progressive Enhancement and Graceful Degradation
Here are some resources also:
Gallery of HTML5 Sites (You can learn and get the idea from them)
Create modern Web sites using HTML5 and CSS3
Browsers that, collectively, cover 95% of the world: Firefox, Chrome, IE6/7/8.
The best way to test them is to install them on your computer.
You want to use html tags and css compatible with mobile browsers.
For anything CSS3 wrap it in conditional javascript. I always make sure the device width is atleast 240px, then anything below that is the old, crappy, mobile look.
You can use a small mobile boilerplate for CSS, to reset the basic tags you use (make them look them same in different browsers). As with any boilerplate, you should look at the css to see if it's WAY overkill.
For a comprehensive guide check out the W3 Mobile CSS2 guidelines: http://www.w3.org/TR/2000/WD-css-mobile-20001013
Another good resource is this compatibility table: http://www.quirksmode.org/m/css.html
Graceful Degradation is all about making compromises -- if you could do everything in the lower version, you probably would. To pick on the example of rounded corners you cite, it may acceptable to you (or your client) to live without them, where there don't exist renderer specific CSS extensions to support them (this is how http://www.ipswich-angle.com/ handles it, for example, I believe). Other options involving images are there, but it is largely dependant on what compromises you and your client are willing to make.
A service like browsershots.org is quite useful to check how your site renders on different browsers and operating systems. You have to wait in a queue for a while but it's worth doing that.
I was going to make this a comment, but then I got carried away..
w3schools has suggestions for using semantic web elements on your site. It suggests using a Javascript library called html5shiv.js to add styling support to IE8 and below so you can find javascript files which emulate specific functionality built into HTML5 like JSON2.js and Webforms2.js.
Finally this article gives a full example of emulating a HTML5 form with many of the new attributes/functionality.
As for building the site, I'd recommend building a HTML4 site first using semantic elements freely (with html5shiv) and testing with IE7. Then as you build parts of the site that require new features, research a Javascript file that will provide older browsers with the same functionality, e.g: when it's time to add your first rounded corner or gradient maybe add CSS3Pie. Always remember as well that your box-model; border-radius and gradients are supported in webkit as well as mozilla's API so many css3 attributes you'll need to add 3 times:
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
Unfortunately I don't have a good resource for how the webkit/mozilla APIs compare with HTML5 functionality.
The only functionality I've struggled to find is support for CSS3 selectors in older browsers, often you can get away with this, I mean if you're not gonna upgrade your browser IMHO you can live with few double-thickness borders or missing alternate row styling in tables.
Maybe one day there will be a site that you can upload your code to that will tell you things like "chrome 20.xyz doesn't support rounded corners, add -webkit-border-radius to add support" but until then adding backwards compatibility after the fact will be near-impossible for complex sites.