Rendering Pages in Different Document Modes in Internet Explorer

I just ran into an issue when trying to convince IE8 to render a document in IE8 standards mode. Even when using the HTML 5, XHTML Strict, or HTML 4 Transitional doctype declarations, it would still render using the IE7 Document Mode, causing all sorts of my CSS trickery to fall to pieces. Everyone talks about using the meta tag X-UA-Compatible with content="IE=8" to force IE 8 document mode, i.e., put

<meta http-equiv="X-UA-Compatible" content="IE=8">

somewhere in the <head> tag of the HTML.

For whatever reason, that wasn't working for me seemingly no matter what I tried. Then I came across the accepted answer to this question on Stack Overflow, which informed me that the meta tag has to be the first (except for title) tag under the head tag. I had it placed after a <link> tag to a stylesheet. Once I moved it up to the beginning of the head tag's children, it worked like a charm.

But seriously, don't forget your doctypes, kids. Just slap a

<!doctype html>

in there on line 1 and be done with it. 

Now to get the client working on upgrading to IE 9 on the desktop...