The best way for a beginner to write for animation is to closely watch animated films, then read the screenplays for them afterwards.