Category Archives: Tech

How to build a WordPress HTML5 theme

Share Button

iPhone, iPad, video HTML5 deployment, Webkit, Chrome, Safari, web standards, canvas elements, and disappearing flash support.  These are just a few of the many reasons to explore HTML5 and its capability.  Add WordPress, a very customizable system that allows skinning of the underpinning code in order to achieve the desired result and you get a great basic test case for HTML5.

What follows is quick synopsis of how to setup an HTML5 WordPress skin and some of the benefits this brings:

To start, I setup basic HTML5 markup.  Utilizing new tags.  Here is what the structure looks like:

Using this basic system as a framework, I added microformats to the header and footer for human and machine readable information.  You can view the source and search for “vcard” to see my microformat header.

Next, I started utilizing some of the great things that HTML5 and CSS3 have to offer.  HTML5 has new form field types that work well for the iPad, iPhone, and Webkit.  In other browsers they fall back to be standard text input fields so it’s not a problem to use them in general markup, even for IE6 (everyones favorite).  Here is a breakdown of some of the new HTML5 form fields:
<input type=”search” placeholder=”SEARCH” value=””/>
The new search input type has a really cool attribute called “placeholder”.  Placeholder is a value that disappears when the form field focuses, a function that we no longer have to emulate with JavaScript on browsers that support this.  The type search also tells the iPhone, iPad, and future dynamic keypads to use a different “enter” key.  Note how the iPad shows “Search” on the keyboard:

<input type=”email”/>
This field type also tells mobile devices to change their keyboard accordingly.  Here is an example of the iPad keyboard with this field type:

<input type=”url”/>
This field type also tells mobile devices to change their keyboard accordingly.  Here is an example of the iPad keyboard with this field type:

Now its time to add the CSS.  Using CSS3 for rounded corners, drop shadows, and gradients, quickly eliminates the need for extra divs, classes, and most importantly, images. I used these styles to do the buttons, the input fields, header and footer styling, and even the background. Here are some of the basic CSS3 styles used:

/* create the body gradient */
body {
	background: -moz-linear-gradient(top, #fff, #ccc);
	background: -webkit-gradient(linear, center top, center bottom, from(#fff), to(#ccc));
/* do the rounded corners and drop shadow on the header */
header {
	-moz-box-shadow: 0px 0px 3px rgba(0, 0, 0, 1);
	-webkit-box-shadow: 0px 0px 3px rgba(0, 0, 0, 1);
	box-shadow: 0px 0px 3px rgba(0, 0, 0, 1);
/* create the button for form submission and search submission */
form .submit {
	background: -moz-linear-gradient(top, #073842, #000);
	background: -webkit-gradient(linear, center top, center bottom, from(#073842), to(#000));

With these styles it’s quick, easy, and image free to do what use to be a much more arduous process for many of us.

Now you’re all done except for IE

Now that the markup is in place and the styles are in place.  We have to make it work for lesser browsers that can’t handle new standards (aka IE).  There seems to be a misconception out there that this is difficult, but it is actually a few simple steps.  For my blog I conceded that there would be some degradation of the look for browsers that don’t support CSS3 so that makes life easier, and of course it may be a luxury not everyone can afford.

IE Step 1: Add support for styling of the HTML5 tags
To do this, all we have to do is include a JS file called html5shiv hosted on  This in essence does a document.createElement and a few other things to get IE to recognize the HTML5 elements.  We can wrap this in conditional comments because it is only required for IE.

<!--[if lte IE 9]>
<script src=""></script>

IE Step 2: IE specific CSS
For any IE specific CSS that you want to do (I added a few different border treatments and color tones to make the site still look ok) add the IE specific CSS file.

So the sum of your checking for IE should look something like this:

<!--[if IE]>
  <script src=""></script>
  <link rel="stylesheet" href="/blog/wp-content/themes/scottgale/style-ie.css" type="text/css" media="screen" />

Make sure after you add this to validate your markup with the w3c validator.  It handles HTML5 quite well from my experience.

And now your are done!

I hope this helps everyone to explore this new web standard.  The blogosphere is an easy place to try this out and help perpetuate these ideas.  Please let me know if I need to explore any of these concepts in more detail for people.

Share Button

Custom HTML5 WordPress Skin Released!

Share Button

I just released my custom HTML5 WordPress skin, and it is a relief to get back to being able to post after working on this. Over the course of working on this I found many new HTML5 tidbits that really help us struggling web developers.

Over the next week I plan on highlighting some of the tech I used so keep an eye out for the next post. Some cool stuff to mention:

  • New Form Fields that preset iPhone and iPad entry according to field type.
  • New search field capability supported in Safari.
  • Only 8 images required to make the whole site, rest done with CSS3 gradients and rounded corners
  • Google Chrome Frame Support, making the web faster and removing IE 1 user at a time.
  • Google hosted code fix for IE
  • New tags such as section, article
  • Added microformat support
  • And many more, stay tuned..
Share Button

Microformats and SEO

Share Button

For a long time search engines have been making sense of a web development approach that doesn’t incorporate consistent markup for consistent items. Search engines have managed to do a great job with this, however, now we have the advantage of microformats and other Rich Snippets. With microformats we can make both machine readable and human readable code. This concept will encourage SEO professionals to engage web developers as well as become more code savvy themselves.

Microformats are simple standardized ways of organizing website information. Microformats have implications for web development standards, SEO, and application development around parsing website information.

Lately, there has been a lot of discussion around these snippets for SEO, geo tagging, etc. I find this a bit ironic because they have been around for so long.  (The microformat search term on Google hit its peak in 2007.)  However, what hasn’t been around for very long is the Google adoption of all of these “Rich Text Snippets”.  The term Rich Text Snippets includes microformats, microdata, and RDFa’s.  I’ve seen some examples on the microformats blog and Google has been blogging about all the support they have been adding.  Google actually made some mistakes in their examples, but it looks like they corrected them. So I thought I would outline my favorite examples of microformats to get that information out there.  Hopefully we can perpetuate the wide-spread use of these.

These are my favorite markup uses for each format:


<div class="hreview">
  <span class="item">
    <span class="fn">Scott Gale's Blog</span>
  Reviewed by <span class="reviewer">John Smith</span> on
  <span class="dtreviewed">
    Jan 6<span title="2009-01-06" />
  <span class="summary">Love the website</span>
  <span class="description">
    I like your blog because it offers me, an SEM evangelist and
    sales guy, an insight into the world of technology from
    someone who understands the very essence of its infrastructure.
  <span class="rating">4.5</span>


<div class="vcard">
  My name is
  <span class="fn">Scott Gale</span>,
  My blog url is:
  <a href="" class="url"></a>.
  I live in
  <span class="adr">
    <span class="locality">South Burlington</span>,
    <span class="region">VT</span>
  and work as a
  <span>Web Developer</span> at


<div class="vcard">
   <span class="fn org">Scott Gale's Web Shop</span>
   Located at
     <div class="adr">
        <span class="street-address">16 Any Dr.</span>, <span class="locality">South Burlington</span>, <span class="region">VT</span>.
     <span class="geo">
        <span class="latitude">
           <span class="value-title" title="37.774929" />
        <span class="longitude">
           <span class="value-title" title="-122.419416" />
     Phone: <span class="tel">206-555-1234</span>
     <a href=""></a>


<div class="hproduct">
   Make: <span class="brand">Maserati</span>
   <span class="category">Automotive</span>
   <h1 class="fn">Granturismo</h1>
   Nicely equiped for:
   <span class="price">$134,000</span>.
   <span class="description">The Maserati GranTurismo design exudes elegance
   and has room for 4.  Reinvented from the ground up.</span>
   <a href="" class="url">View Details</a>

Video: (RDFa from Google’s site)

    <object width="512" height="296" rel="media:video"
     <param name="movie" value="" />
     <embed src=""
       type="application/x-shockwave-flash" width="512" height="296">

     <a rel="media:thumbnail" href="" />
     <a rel="dc:license" href="" />
     <span property="dc:description" content="Cute Overload defines Baroo? as: Dogspeak for
      'Whut the...?'Frequently accompanied by the Canine Tilt and/or wrinkled brow for enhanced effect." />
     <span property="media:title" content="Baroo? - cute puppies" />
     <span property="media:width" content="512" />
     <span property="media:height" content="296" />
     <span property="media:type" content="application/x-shockwave-flash" />
     <span property="media:region" content="us" />
     <span property="media:region" content="uk" />
     <span property="media:duration" content="63" />

(Would be nice to see a video microformat, they audio spec is in review currently.)

With Google’s adoption of these standards it puts microformats in the running for some serious SEO discussion. Google has a lot of documentation about this. They also have a rich snippet testing tool to confirm that your html is properly formed and able to be parsed.

Also, I stumbled upon a great post by Jay Myers about the potential of these formats and how it relates to SEO.

With Google’s adoption of this it puts microformats as a new and important SEO component. Utilizing the examples above coupled with the tools that Google has for testing will help create a more human and machine readable web. can help get you started if you are interested in becoming a contributor.

Share Button

My new blog mock in HTML5

Share Button

So this week I discovered ( I know lots of people say, don’t trust the opinions of random people out there but at the same time, that is the internet constituency hitting my site. It is good to have some opinions from a diverse set of people. I loved the opinions that I have received thus far, some good ideas have come out of it. I encourage people to try this service, as long as you review other people’s work it is free to try.

So here is the mockup I posted there, which I have built in HTML5:

New Blog Mockup

You can check out and comment on the new concept in or on this site.  Once I have this fully solidified I will send around my general markup philosophy for setting up a wordpress skin in HTML5.

Share Button

Setting up an iPhone WordPress Plugin

Share Button

iPhone WordPress Screenshot

After I setup the iPhone version of my blog a lot of people were asking me how to do it. Truth is the plugin I’m using makes it extremely easy. Even if you host your own WordPress blog it’s easy to add the WPtouch plugin and get your site iPhone enabled. From your admin console go to Plugins > Add New > search for “WPtouch”, hit “Install” and you are good to go.

The only problem I ran into is that after I installed W3 Total Cache it completely hosed my iPhone site version. So pay attention to possible plugin conflicts as you further optimize your site.

Share Button

CSS Vertical Text

Share Button

Many people have written about the potential for vertical text in CSS so I wanted to try it out for myself. By using the technique described below I was able to achieve this effect:

*Disclaimer: This doesn’t work in old Opera versions, but does work in Opera 10.5. This also works in IE6+, FF, and Webkit based browsers, so that is pretty encompassing.

Here is the basic markup:

<p>CSS Vertical Text</p>

I wanted to try to do my best to exclude IE browser checks and conditional checks. So this example handles all browsers mentioned previously with a single CSS block:

p.css-vertical-text {
	border:0px solid red;
	-o-transform: rotate(90deg);
	font-family: ‘Trebuchet MS’, Helvetica, sans-serif;
	text-shadow: 0px 0px 1px #333;

Also, if I can stay away from IE filters I like too, but it’s worth mentioning that if you have an specific rotation, you have to use the IE filter:

filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);

Where 0, 1, 2, 3 correlate to 0, 90, 180, and 270 respectively.

So I tried to keep this one simple, but lining everything up in different browsers can be a pain because of the way each browser interprets the spacing.

Information for this post was pulled from the following places:

Real text rotation with CSS

Share Button

Pure CSS3 Rounded Corners Slideshow

Share Button

Be sure to view this example in SAFARI or CHROME.

CSS3 and HTML5 are presenting some exciting opportunities for the future.  So I set out to test some of the features that are emerging.  The ability to do rounded corners and shadows has been around for awhile. With CSS3 it’s such a pleasure to be able to quickly add these.  Webkit specifically is now supporting animation capability. There are now options for styling that include quite a few animations. Hopefully this will get picked up in FireFox and standardized (it’s in the proposed spec for the w3c). Although I think we still need some work in terms of a dynamic set of N items, this is a good start. To be able to do this without any JavaScript or Flash at all is a pretty great step in the right direction for the web, oh and yes, this works on your iPhone.

View Larger Example

First I setup some basic markup:

<div class="slideshow-example-frame">
	<img class="img1" src="2010-quattroporte-sport-gt-s-sedan_01-thumb.jpg" alt="2010 Quattroporte Sport GT-S" />
	<img class="img2" src="2010-grandcabrio-convertible_01-thumb.jpg" alt="2010 GrandCabrio" />
	<img class="img3" src="2010-grandturismo-s-automatic-coupe_01-thumb.jpg" alt="2010 GrandTurismo S" />
	<img class="img4" src="2010-grandturismo-s-coupe_01-thumb.jpg" alt="GrandTurismo S Coupe" />

Then I setup some basic CSS3 to do the rounded corners and shadows:

<style type="text/css">
	.slideshow-example-frame {
		-moz-border-radius: 7px;
		-webkit-border-radius: 7px;
		border-radius: 7px;
		-moz-box-shadow: 0px 0px 10px rgba(0, 0, 0, 1);
		-webkit-box-shadow: 0px 0px 10px rgba(0, 0, 0, 1);
		box-shadow: 0px 0px 10px rgba(0, 0, 0, 1);
		margin:30px 30px 30px 22px;

	.slideshow-example-frame img {
		-moz-border-radius: 7px;
		-webkit-border-radius: 7px;
		border-radius: 7px;
		-webkit-animation-iteration-count: infinite;
		-webkit-animation-timing-function: linear;

	.slideshow-example-frame img {


Next add the animation pieces:

<style type="text/css">
	.slideshow-example-frame .img1 {
		-webkit-animation-name: fadein1;

	.slideshow-example-frame .img2 {
		-webkit-animation-name: fadein2;

	.slideshow-example-frame .img3 {
		-webkit-animation-name: fadein3;

	.slideshow-example-frame .img4 {
		-webkit-animation-name: fadein4;

	@-webkit-keyframes fadein1 {
		0% {opacity:0;}
		5% {opacity:1;}
		25% {opacity:1;}
		100% {opacity:1;}

	@-webkit-keyframes fadein2 {
		0% {opacity:0;}
		25% {opacity:0.0;}
		30% {opacity:1;}
		50% {opacity:1;}
		100% {opacity:1;}

	@-webkit-keyframes fadein3 {
		0% {opacity:0;}
		50% {opacity:0;}
		55% {opacity:1;}
		75% {opacity:1;}
		100% {opacity:1;}

	@-webkit-keyframes fadein4 {
		0% {opacity:0;}
		75% {opacity:0;}
		80% {opacity:1;}
		100% {opacity:1;}
Share Button

When is it time to drop Internet Explorer?

Share Button

After reading the recent posts on Microsoft’s Developer’s Network pertaining to Internet Explorer I am more discouraged than ever.  IE9 finally does support rounded corners but what’s disappointing is how long it has taken them to get there.  The IE9 acid 3 test is 32/100 and it’s not even out yet.  Firefox is 94/100, Safari and Webkit are 100/100.  I would really like to hear from Microsoft on how they explain how far behind they are on innovating.  The sad part is, unless there is a radical change in how things are perceived, Microsoft will get away with it.  Complaints about a website lacking in functionality or having problems go to the webmaster, not to IE6 or 7.  Our statistics still show that we are getting more hits with IE6 than Firefox, Safari, and Chrome combined.  Every web developer has complained about the lack of standard support.  By the time that Microsoft releases IE9 with its lackluster feature set, web development as a whole will of leapfrogged by them.  It seems the only bright spot in this mess is the Google Chrome Frame project.  Google, showing their frustration with this problem, wrote an application that sits inside IE and renders with all the open web standards that we know and love (faster than IE I might add).  So now what is the problem?  Do IT managers that still force IE6 with no admin privileges down the throats of their users get blamed?  No, us web developers will continue to take the heat if the user can’t install the plug-in and our sites don’t work for IE6 users.

Share Button

Real Estate Agent 2.0

Share Button

This is my advice to the real estate agents of the future, some of these ideas came from a great book What Would Google Do by Jeff Jarvis. Would love to hear others thoughts on the matter.

PageRank: “PageRank” is what your partner was referring too, perhaps inadvertently, for improving your sites standing on the internet. It was named after Google found Larry Page. It is part of the algorithm that google uses to decide the importance of pages, not only the number of pages linking to your site, but the weight that each page holds in terms of their google weight. So I want to make sure that I am clear and didn’t advise you that this still isn’t important, it is, its just that there are a lot of ways to get those links out there in the new web, and you should make sure to leverage them.

Crowd Openness: I’ve been giving a lot of thought about your question of better to show more content or less content on a site. There is a lot of frustration by the consumers / end users for real estate and how closed down the system is. In my web development universe I always put special weight on the opinions of my user base, no matter how crass they sometimes sound. I would recommend an A/B test, to see whether or not openness of information prevails. You have access to the MLS system, giving others open access to information has the potential to create a following and better engagement of your user base. People could start going to your site because they know that you will give them all the facts, and help them make the best comparison possible, your site would start connecting people to the exact home they are interest in, and could generate higher quality leads and a large user base. The A/B test would be show one details page with all the information about a listing, stored by session so that they would get a consistent result, the other details page would be with your conventional information. I think you’ll find that in the end, having open, easily researchable material is going to help drive you forward, sometimes it seems counter-intuitive to the old convention, and frankly, to the locked-down MLS itself, but someone else is going to do this and leap frog past other realtors if you don’t.

The Power of Information: Zillow,, other community information sites. All these are giving consumers the power to determine for themselves the market price of these houses. If you build your philosophy around empowering your users by leveraging this data, they will in-turn thank you by leveraging your site as the resource for research. Why should your users have to spend time clawing their way through tons of other community and real estate sites when everything they need is right in front of them. Tap the wisdom of the crowds to make that work.

Leveraging New Media / Marketing: Lot’s of agents think that they are marketing, but really are just marketing themselves. Just in the stuff that I’ve seen from you I think you have made a lot of progress with getting past that, but how are you going to market in an open internet? I think you can build this engine behind the scenes that is relatively automated for you, but that is creating content organization and reaching out to internet communities. The video tours are cool, but why not have them posted on youtube and embedded into your site as something that people are more familiar with. Google owns youtube and is quick to get that content into a searchable form, all you need is your iphone. If you have a account you can auto-post even as you are doing the videos of the house. The community section that you have on your site is great, but the future of this is to really expand it through they power of your user base and through the internet community. Use Yelp, Zillow, and community blogs, reviews of local restaurants, schools, leverage commenting etc to add a whole new dimension to your community pages. Make sure to structure your site, especially details page to harness that information and deliver that to your users in a behavioral way.

SEO Basics: Some people think of this as a black box, but there are some easy formula’s to apply to help.

  • Meta data should be dynamic by listing
  • The first t1 on the page should be the most important information describing the page and should be dynamic based on the listing as well.
  • Name the page in terms that your users will understand: Google Insight is a free resource for measuring how productive your page titles are going to be. USE IT! Make sure that your meta data and page titles reflect what people are looking for so you can get people the information they need. For instance, for some reason people really like to put “for sale” on a lot of their home searches, so make sure you incorporate that in your title.
  • Try out Adsense: not sure how much you’ve done with this, but the whole process is extremely flexible, so it’s worth spending a few marketing dollars. When you do though, make sure you analyze what searches people are making to come find you, and make sure you bid appropriately using the philosophy above.
  • Make sure to maintain a sitemap with dynamic auto-generated pages that feed google the information it needs. You should have a sitemap linked to on the page as well as an XML version.
Share Button

Will IE8 finally rid us of IE6?

Share Button

IE8 was officially released on March 19th, 2009. Marking a great day for people begging for the deprecation of IE6. As of the 5th of April, IE8 was up to 3+% and based on IE8’s speed, standard support, and security, I’m hoping this trend continues upward, displacing IE6 which is showing ~22%. (Source:

IE8 has added numerous new security features. Some of which are more functional than others. IE8 has instituted two new filters; the cross-site scripting filter, and the smart screen filter (successor to the anti-phishing filter). The cross-site scripting (XSS) filter, sure to cause developer pains, blocks XSS requests from executing and pops up a notification that an attack has been blocked. I’m still waiting to see how this plays out for people using CDN’s like Akamai to host their static content. I haven’t noticed any problems on my sites as of yet. The Smart Screen filter warns you if there is one website impersonating another. This has become a popular attack method of sites for capturing private data or getting on to your machine so its nice to see Microsoft addressing this. Included in this is domain name highlighting, a feature sure to be missed by the average consumer. In terms of Security, IE8 also offers the InPrivate browsing feature (Porn Mode), that doesn’t log your history or cache anything.
In terms of Speed from personal experience the IE8 rendering has been quite good. Microsoft posted some speed comparisons ( that show some excellent times. If anyone has seen speed comparisons to IE6 I would love to see them.

IE8 now passes the Acid 2 test completely. The Acid 2 test is a test page written to help browser manufacturers ensure support for proper web standards in their products. This makes me and many other web developers very happy, especially if they can get a better than 3.4% market penetration with IE8. Sadly IE8 doesn’t pass the next level of standards; the Acid 3 test, which tests for numerous items including DOM Traversal, DOM Events, CSS 3 Selectors, SVG, and ECMA Script. To Microsoft’s credit though, FF3 is only scoring a 71/100. Opera 10 and Safari 4 are the only ones showing promise of passing that currently.

So what we are left with is a highly secure, fast browser, which is out of Beta (unlike Gmail). So here is where I plead: Please, Please, Please if you are an IT person reading this, get your people off of IE6, the browser is now 8 years old, susceptible to all types of attacks and incredibly slow at rendering pages. Any costs associated with making an upgrade to the newest version of IE are trumped by the costs of trying to deal with and support the nightmarish flood of junk that IE6 brings with it. And if you are still concerned, don’t forget, IE8 has a compatibility mode. There are no excuses anymore to keep your people on IE6. I have a dream that IE6 will be below 3% by the end of the year.

Share Button