Well, properly validated html and css files are also an on-page optimization factor. Google apparently seems to weight it.
Many people forget... DONT USE FLASH ADS. H1, H2, meta tags, sitemaps and related content (bold in the right places + underlined) is enough. Onpage is not even a quarter of the game. You need to have it in place, organized - And your websites needs to be accessible (quickly loading) + easy to navigate. Not something so hard to do. Now go build links.. That is what SEO is about. (Atleast I see it this way ).