Use HTML5 Elements in Today’s Browsers

I am taking John Allsopp’s HTML5 Live course offered by SitePoint (a great deal, by the way), right now, and he shared a neat little tip that I wanted to pass on. You can use many of the new HTML5 elements (header, article, section, etc.) right now, even in older browsers like Internet Explorer 7.

All you need to do is add an extra “boolean attribute” to the element, and you can then style them with CSS in almost all of the browsers currently being used.

Creating a Header/Footer to be Used on all Pages

I referenced this in a post from a few months ago, but never bothered to expound on it. You cannot use cascading style sheets (CSS) to create headers, footers or menus that will be re-used on all of your pages. Instead, you have to use server-side includes (SSI).

There are a handful of ways to use SSI, and they are available in most all of the Web development languages used today. Although I think the use of repeating headers and footers is somewhat outdated, opting more for using templates that dynamically include your content, I’m going to try to teach you a few ways to include your headers, footers and/or menus on all of your pages.

An Interesting Tidbit About W3C’s Validators

I found out something interesting about the W3C validator services yesterday while working on some code. I wanted to find a way to dynamically validate my pages, so that I didn’t put a validity notice on the page if it wasn’t valid.

While validating one of my pages, I decided to check the response headers returned by the W3C validator engine, just on a whim, to see if there was anything in there that might tell me whether or not my page was valid.

What do you know? Not only is it spelled out in very plain English, the header also tells you how many errors and warnings were returned by the engine if the page wasn’t valid.