With SEO, you will make mistakes. It's inevitable. You just have to learn from them, and from other resources. Just use the right keywords the first time, take advantage of alt tags and title tags, and make sure you have proper and clean code.
This article lists the the mistakes you could make and ways to avoid the problems.