Semi-colons and colons - help!

Use a semicolon between independent clauses in a sentence if they are not joined by and, but, or, nor, for, or yet.

First I had a sandwich and a glass of milk, and then I called you for the homework assignment.

First I had a sandwich and a glass of milk; then I called you for the homework assignment.

Patty likes to act in plays, buther sister gets stage fright.

Patty likes to act in a play;her sister gets stage fright.

A semicolon can take the place of a period between two independent clauses that are closely related.

Sarah looked out at the downpour. Then she put on her raincoat and boots. [two simple sentences]

Sarah looked out at the downpour; then she put on her raincoat and boots.

I got more, but for now, let's look at your sentence:

"The teacher entered the room: the girl quickly closed down the web page."

Use a colon between independent clauses when the second clause explains or restates the idea in the first.

Lois felt that she had accomplished something worthwhile: she had designed and sewn her first garment.

Benjamin Franklin had many talents: he was an inventor, a writer, a politician, and a philosopher.

Now, back to your sentence:

The colon introduces a second clause that explains the main idea of the first clause. The teacher came in the room and the girl reacted. This is the similarity between the two ideas. Her reaction of closing down the web page was in response to the teacher coming into the room; it doesn't explain why she came into the room, but what happened when she came into the room--which is added information.

In other words, "When the teacher entered the room, the girl quickly closed down the web page." The author didn't use a semicolon because the emphasis is more explanatory in nature as opposed to linkage and/or relationship. This is my guess.

Here's more about how a semi-colon can help put two ideas together.

Use a semicolon between independent clauses joined by such words as for example, for instance, that is, besides, accordingly, moreover, nevertheless, furthermore, otherwise, therefore, however, consequently, instead, hence.

Emma felt shy; however, she soon made some friends.

My parents are strict; for example, I can watch TV only on weekends.

A semicolon (rather than a comma) may be needed to separate independent clauses joined by a coordinating conjunction when there are commas with the clauses:

Alan, Eric, and Kim voted for her; and Scott and Vanessa voted for Jason.

Scanning the horizon for the source of he whirring sound, Leo saw a huge, green cloud traveling in his direction; and, suddenly recognizing what it was, he knew that the crops would soon be eaten by a horde of grasshoppers.

/r/grammar Thread