How can I avoid browser compatibility issues?

What are the best practices which help in avoiding browser compatibility issues? Please suggest.