|HTML5 & CSS3 - How are you using them?|
| 6:17 pm on May 11, 2011 (gmt 0)|
i am sure this has probably been covered a ton...but
HTML5 and CSS3 look awesome. i have even started using a few little things from css3 on a couple sites such as curved borders and drop shadow....but...
what are folks doing with HTML 5 and CSS3 considering IE8 and below will not do anything with it?
sure there is always making an if IE style sheet but if an entire site was done in CSS3 (i am not sure what you would do if you had a bunch of HTML5)it would seem very tiresome to do an entire new sheet for IE8.
what are your alls thoughts and how are you using the new stuff?
| 7:53 pm on May 11, 2011 (gmt 0)|
I think that regardless HTML5 is necessary to learn for any developer as it will be the standard at some point. More and more big companies are putting investments into HTML5 and CSS3 as long as that continues I can't see this going away anytime soon.
The problem I have is not knowing how to gage the current state of where browsers are accepting html5 as a standard, until this happens it will be a game of trial and error.
On a personal note I use html5 for my code and am enjoying the ease of the <canvas> feature and much more.
| 8:02 pm on May 11, 2011 (gmt 0)|
I totally agree that it is worth learning. I guess i am more curios as to how people are using it and still dealing with browsers that do not use it.
| 9:44 pm on May 11, 2011 (gmt 0)|
This is where those user-agent-spoofers come in handy if you forgot to hide copies of your older browsers so they wouldn't get overwritten when you upgrade. Do as I say. Not as I do.
What follows comes from rules learned while making e-texts, where one of the criteria is that it has to be readable even without CSS, and scripting is strictly forbidden, but it's adaptable to HTML in general.
In CSS you can generally make something cumulative. For each feature, start with setting up something that works in both 2 and 3, and then add the bits that will only be done if the browser recognizes 3. This is assuming for the sake of discussion that you're dealing with "compliant user agents", meaning that they ignore anything they don't understand. (In the case of That Browser, this is not always a safe assumption. What a good thing the "conditional comment" is only recognized by ... the only browser that ever requires a CC ;))
The nasty thing about html5 is that they've dispensed with the dtd (what's supposed to happen when they develop html6?) so when the browser sees a naked "html" they'll interpret it as whatever the ### they feel like-- and once they've picked a language, they're not going to change halfway through the text. Probably. So you have to deal with both possibilities:
#1 Things that work in HTML4 but aren't recognized in HTML5. Luckily most of them are things like <font> that you shouldn't be using anyway. But some things like the loss of <tt> really are an annoyance. (They only decided at the eleventh hour to keep "target = _blank". Whew.) Time to get verbose and shovel things into the CSS.
#2 Things that are new to HTML5. Same deal as CSS: the page has to work without them, unless you serve different versions depending on exactly what browser you're dealing with. Well, you probably do already. But normally just for browser names, not version numbers. And cross your fingers when dealing with users who've disabled everything that would allow you to find out what browser they've got. Now you've got an infinitely growing set of variant forms because some people never, ever update their browsers while others do it religiously-- and sometimes you really need to keep those older-browser users.
Aside: Old software doesn't always equate to customers without money. If, say, you're selling antique furniture or a certain type of real estate, you've got customers who reluctantly bought a computer in 2003 but have flatly refused to change anything about it since then. And if they're living on a trillion-acre estate they may be on satellite, which can be just as slow as dialup. You don't want to lose them.
Oh, and #3 The icky, messy area of things that are interpreted differently between HTML4 and HTML5. Better leave 'em out altogether, unless your page actually is written in 4 and says so.
| 3:55 pm on May 13, 2011 (gmt 0)|
[diveintohtml5.org...] is an excellent introduction covering the new features in HTML5 as well as how to detect support for them. Highly recommended.
|The nasty thing about html5 is that they've dispensed with the dtd |
Browsers use the same "HTML" parser to parse all text/html pages, including pages with HTML2, HTML3.2, HTML4, XHTML1 doctypes.
The only thing browsers have ever used the doctype declaration for is to switch between quirks and standards modes. More info on the WHATWG FAQ:
| 11:10 am on Jun 3, 2011 (gmt 0)|
HTML5 and CSS3 is really cool and awesome.
I always use these and a few time I stuck with browsers issue.