An Experiment in HTML5 and CSS3

An Experiment in HTML5 and CSS3

A couple months ago I decided it was about time that I jumped on the HTML5 bandwagon. I really hadn't had any real world experience building anything in HTML5, and had only used a few CSS3 properties as progressive enhancements. I really wanted to take some time to design and build something awesome - without having to worry about the elephant in the room, *cough* Internet Explorer *cough*.

Unfortunately, I didn't have a whole lot of unique content laying around that could be the foundation for my site, so I decided to go the Lifestream route. I also decided to build the site with Yong Fook's SweetCron platform, which is built on my favorite php framework, CodeIgniter. It aggregates feeds from this blog, my Twitter, Delicious, Last.fm, Flickr and YouTube accounts. But enough about the boring backend details, let's move onto the new and exciting things.

The Result

You can see the final result of my HTML5 and CSS3 experiment at me.evanblack.com. Make sure to check it out in any GOOD browser, like Firefox, Safari or Chrome.

Lifestream Preview

HTML5

If you take a look at the source code, you should notice how clean it is. HTML5 is a semantic wet dream. Pretty much every element, from <nav> to <header> to <article>, has a semantic meaning. This, coupled with some advanced CSS3 selectors, means you hardly ever need to use IDs or even classes! I think the hardest thing to get used to is the fact that not only is your page going to have a header and footer structure, but so is each article within your section.

If you're looking to read more about the new structural elements in HTML5, I'd recommend reading Steve Smith's article on Structural Tags in HTML5. Unfortunately, I didn't get the chance to do too much experimenting with the new <video>, <audio> and <canvas> elements, or with the new form features, but these are sure to make HTML5 even more robust once the spec is approved.

Note: Once the W3C agrees on a standard video format for the <video> element (my guess is h.264), and browser vendors get it implemented, it will make this element much more widely used because of iPhones and iPod Touches.

Design and CSS3

The main CSS3 features I implemented - aside from the usual border radius and text shadow properties - were @font-family, rgba, box-shadow and CSS gradients. I've used Yanone's awesome free font, Yanone Kaffeesatz, via @font-family for all the headlines. I also played around with a combination of border radius, rgba and CSS gradients for the navigation tabs, which I think turned out pretty well. I even tried to do some CSS transform magic for the tab animation, but alas, I had to resort to Javascript. Be sure to check out the CSS to take a closer look at how I put some of the new CSS3 features to work.

Javascript Finishing Touches (jQuery of Course!)

For some finishing touches I added a bit of jQuery magic to handle the navigation tab animation, the endless scrolling, and thus needed 'back to top' link. There's also some other javascript to help bitch-slap IE into submission, although I haven't really done much testing to see how the site's looking in it. IE8, at the very least, should not completely crash.

Conclusion

Please take a look at the final result and let me know what you think! Unfortunately, there's a lot of twitter content right now, so be sure to check out the different categories to see the alternate post designs. Building this thing was quite a learning experience and it's nice to see front-end development going in a good direction.

I'll also be adapting this baby into a Tumblr theme so stay tuned for that!

Tags: , , , ,

Delicious Digg StumbleUpon Reddit

17 Comments

  • July 20th, 2010 at 8:29 am

    Thank you very much for this fascinating article.

    I wish to tell me what you think about this article.

  • SEO
    August 11th, 2010 at 6:41 am

    Wonderful I would like to say thank you for sharing this cool article. Bookmarked and sharing for friends.

  • Juan Pina
    August 17th, 2010 at 3:37 pm

    Amazing design. I love it. Awesome implantation of the the new kids on the block, it really looks wonderful and it functions great, five stars.

  • October 6th, 2010 at 1:19 am

    Great website man…thanks for the post…this article was really great…keep on posting such stuff…great work….

  • Vlad
    October 20th, 2010 at 2:31 am

    great example. you just need to ajust how footer position works on iPad. currently its position doesn’t change when scrolling the page. could be because of the touch events..?!
    same goes for the *beam me up* link. cheers!

  • adrian
    November 24th, 2010 at 3:59 pm

    Totally awesome,

    How did you display the correct time_date with the youtube videos? I’ve been having trouble finding out how, because the sample plugin just leaves the date the video was posted, not when it was favorited.

    Cheers,

  • December 21st, 2010 at 1:31 am

    If you’re looking to read more about the new structural elements in HTML5, I’d recommend reading Steve Smith’s article on Structural Tags in HTML5.

  • Evan
    January 5th, 2011 at 4:19 pm

    @adrian - Yes, I struggled with that as well. In the pre_db function of the youtube plugin for Sweetcron, I change the item_date value retrieved from YouTube with the current time (time()).

  • March 8th, 2011 at 2:17 am

    I am very much pleased to have such type of information, Thanks for sharing excellent article.

  • April 9th, 2011 at 4:34 am

    Hey, Its a pleasure to comment for this great information.Thank you for this sharing.

  • May 17th, 2011 at 3:25 am

    Building or designing something on line need skill, knowledge and tools. So my friend, keep your work and wish you could make the best.
    Fleet Managenet

  • August 11th, 2011 at 2:41 am

    Awesome work ! Your website page has supplied me most of the answers I needed .

  • August 16th, 2011 at 7:22 pm

    Awesome design, the future of website design looks to be a very exciting time with HTML5 and CSS3, Love the large typography!

  • September 17th, 2011 at 1:35 am

    Really informative article. Wonderful work in me.evanblack.com. I appreciate your efforts you put to develop an amazing website.

    Thanks for sharing your experiments!

  • Jon
    January 16th, 2012 at 8:29 pm

    Very, very cool.  Great idea and fantastic implementation.  Way to make use of the coolest stuff available.

    St Louis SEO web design

  • January 17th, 2012 at 6:16 am

    Nice experiment, it’s very useful for me.  I am doing some research these days, after seeing your blog, I understand how to do it, thanks for the sharing.

  • January 29th, 2012 at 10:12 pm

    Oh my! You’re a fascinating scientist indeed! By observing it, I can tell that you succeed with your experimental set-ups and probably making it to the point of more wonder creations! You were immeasurable. Well done!

Add your 2 cents:

Remember my personal information

Notify me of follow-up comments?

Please enter the word you see in the image below: