shauny.me

“The future of the web is HTML5.”

Dean Hachamovitch
General Manager, Internet Explorer 

IEBlog : HTML5 Video

“Seriously, this is the real deal — full-screen H.264 playback with no Flash, no browser plugins, full iPhone OS support, and sane CPU usage, better in every single regard than any video player ever made with Flash.”
SublimeVideo - HTML5 Video Player (quote via Daring Fireball)
“The real situation is that today, two and a half years after the iPhone debuted, web developers can no longer count on every viewer being able to render Flash. The percentage of web user agents with Flash installed is now going down, not up. My money says that trend is permanent, and further, it’ll reach a tipping point in the not-so-distant future and Flash will turn into something like Internet Explorer.”
— John Gruber
“How would you use flash on an iPad or iPhone though? Anything Flash that requires the keyboard and the mouse at the same time wouldn’t work… Anything that uses arrow keys wouldn’t work… Hovering over controls for drop down menus on flash websites wouldn’t work… Enabling Flash wouldn’t do ***** all but enable ads, why exactly do we want this so bad?”
— One of the best arguments against flash on the iPhone/iPad yet (apart from the fact that flash is not a web standard, not open source, slow and buggy on the Mac and is fast becoming obselete)

With every sale of the iPad that’s one more person using a high class standards-based web browser (Safari) and email client (Mail). Yay!

RT @Jilion: Have a look at SublimeVideo, our new HTML5 video player http://jilion.com/sublime/video

No, no, no! You’re doing it wrong!

You may want orange text, and that may be a lovely orange, but this is completely the wrong way to go about doing it. The whole point of CSS is that it should be a separate layer of styling which is added to your website, and can be interchangeable. You should be able to change the colour of that orange text some day.

To use a class name such as ‘orangetext’ you are completely missing the point. When it comes to changing that orange to perhaps a blue or green, you are going to either:
Have something in your HTML called ‘orangetext’ that is blue, causing confusion to anyone else looking at your code (and to your future self, when you forget why you did this)
Or you have to go through your website replacing ‘orangetext’ with something elseNeither of these outcomes are desirable.

So what should I do?

Solution 1: Use class and id names that describe the content, not the presentation. Perhaps simply use the <em> tag, which implies an emphasis; or <strong>, which implies a strong emphasis

Solution 2: Use HTML5 and CSS3 to completely eradicate class names. It can be done (that website has no <divs>, no classes, no ids). This not only makes your code future-proof, but also beautiful.I have not yet got to the point where I am building websites without classes (one major hurdle is Internet Explorer support, as usual) but at the very least you should make sure your class names are representative of the content and not the presentation. A couple of examples follow:

BAD: <span class='orangetext'>     GOOD: <em>
BAD: <p class='title'>     GOOD: <h1>

No, no, no! You’re doing it wrong!

You may want orange text, and that may be a lovely orange, but this is completely the wrong way to go about doing it. The whole point of CSS is that it should be a separate layer of styling which is added to your website, and can be interchangeable. You should be able to change the colour of that orange text some day.

To use a class name such as ‘orangetext’ you are completely missing the point. When it comes to changing that orange to perhaps a blue or green, you are going to either:

  • Have something in your HTML called ‘orangetext’ that is blue, causing confusion to anyone else looking at your code (and to your future self, when you forget why you did this)
  • Or you have to go through your website replacing ‘orangetext’ with something else

Neither of these outcomes are desirable.

So what should I do?

  • Solution 1: Use class and id names that describe the content, not the presentation. Perhaps simply use the <em> tag, which implies an emphasis; or <strong>, which implies a strong emphasis
  • Solution 2: Use HTML5 and CSS3 to completely eradicate class names. It can be done (that website has no <divs>, no classes, no ids). This not only makes your code future-proof, but also beautiful.

I have not yet got to the point where I am building websites without classes (one major hurdle is Internet Explorer support, as usual) but at the very least you should make sure your class names are representative of the content and not the presentation. A couple of examples follow:

BAD: <span class='orangetext'>     GOOD: <em>
BAD: <p class='title'>     GOOD: <h1>

“If Daring Fireball looks goofy in your browser, you’re likely using a shitty browser that doesn’t support web standards. Internet Explorer, I’m looking in your direction. If you complain about this, I will laugh at you, because I do not care. If, however, you are using a modern, standards-compliant browser and have trouble viewing or reading Daring Fireball, please do let me know.”
— John Gruber’s bit on Web Standards. Love it. (Daring Fireball: Colophon)
“Yet, thanks largely to the success of the iPhone, Webkit (Apple’s open source version of KHTML) in the form of Safari, has been a surprising force for good on the web, raising people’s expectations about what a web browser can and should do, and what a web page should look like.”
Jeffrey Zeldman, Web Standards Secret Sauce (via webkitbits)