I hate the comparison of these 2 games, they are completely different styles.
I personally hated Halo 1+2, terribly unrevolutionary simplified shooters, but loads of people loved them.
Halo 3 has started to add more to the genre with personal shields etc and I found it pretty good fun

but I can see how the extra additions might make the normal halo fan feel abit overwhelmed. I have only played Halo 3 at m8s houses, might buy it myself but the orange box is 1st on my list

.
to me though Halo is always abit too old school, ie enemies take an entire clip to kill(ie work through their shields) reminds me of quake 3 gaming, which for me was great at the time, but is just a little outta date for me(my preferance).
CoD4 has alot more to think about with all the perks and different styles available. CoD4 has brilliantly merged both the stealthy shooter and run around blasting everything.
If you want you can grab a SMG or machine gun and run around like a mad man shooting everything that moves or you can don on some heavy camo and a sniper rifle and go crawling through grass picking people off 1 by 1. they have also made it almost impossible to camp in 1 place. This is down to map design, if you camp in 1 spot too long you are bound to have someone knife you in the back or be killed by a grenade.
CoD4 single player is phenominal, although the map design is sometimes limited. I personally prefer the open landscapes of crysis on my pc. but the story of cod4 is very gripping, once you have started you just dont stop! From the very 1st absail down onto a boat right up to the final(very memorable) shot. Short but very powerful story.
length: Halo3 is is a little bit longer but also a very short game
All in all it depends what you want, if you want a futuristic simple shooter id say go with Halo3 if you want a modern day simple shooter with the option to make it much more complicated via custom classes go with cod4. ie do you wanna shoot lasers or bullets :P