(This post is part of my "What Age are you Writing For?" series. You can find the introduction and list of age ranges here.)
Middle grade novels are probably what most people think of when they think of children's books. This is the age range for the first three Harry Potter books, Fablehaven, the Series of Unfortunate Events, and many other famous children's classics.
Middle grade books are aimed at children ages 7-14, although they often are further divided into young middle grade (7-10), middle grade (8-12), and upper middle grade (9-14).
The main character of a middle grade book should be at least the same age as the intended readership. As a general rule, kids prefer to read about characters 1-2 years older than themselves. , Ages 10-12 are most popular for MG main characters since teenager characters drift into YA themes and audiences.
Because MG books are written for children who can read fairly well, these books can be written in such a way that adults enjoy them too. There is not much dumbing down in terms of vocabulary or grammar, although sentences still remain fairly approachable and avoid getting too poetic. The plotlines also can be complex, with characters who might not be fully good or evil, mysteries that can't be solved on the first page, etc.
Word counts for middle grade novels range from 30,000-60,000 words, with fantasy and science fiction tending to dominate the longer side of the range.
Despite the more advanced language and plots, the stories themselves still need to appeal to children first and foremost. These stories often are full of humor or larger than life characters. The issues explored in these stories should appeal to children: things like friendship, learning how to fit in, learning to deal with other people, navigating relationships, navigating the world outside their home more independently, dealing with authority figures like parents and teachers, etc.
The stakes of the books should be very personal and the effects of the villain should be directly on the main character. A dictator who has conquered the known world will have large political and military issues, but these are a little large to be tackled in a middle grade book. In Harry Potter and the Philosopher’s Stone, Voldemort threatened the safety of the known world by breaking into Harry’s own school. In The Lightning Thief, Percy Jackson takes on a war between the gods in order to save his mother. The antagonist can be powerful and have a wide reach, but the main character’s goals still need to be very personal and immediate, like the worlds of the kids that are reading these books.
Romances, if present, should be crushes. There should be very little display of romantic affection and little-to-no description of physical attraction. Remember, even if your characters are 12, the readers are still 8-10 and still think the opposite gender has cooties. You can probably get away with hand-holding, but not kissing.
Middle grade books are getting edgier right now. They are tackling new topics and dealing with new content, but there are definitely still conservative expectations in many parents, teachers, and reviewers about swearing, violence, graphic content, etc. A safe rule of thumb would be staying PG. You also can research your genre and your intended publisher to see what they are currently looking for.