Syntactically correct, semantically incorrect sentence

Solution 1:

The panda eats, shoots and leaves.

The syntax is correct: it relates an observation of a panda eating before shooting and leaving. However, the misplacement of the comma makes the sentence semantically incorrect, as the intention of the sentence should be that pandas eat shoots and leaves, not that this panda was shooting. (No offense to the Kung-Fu Panda, who may actually shoot.)

Solution 2:

Noam Chomsky famously used the sentence "Colorless green ideas sleep furiously". The syntax is flawless, but it has no meaning.

Solution 3:

A rock smelled the color nine

The syntax of the sentence works just fine but the sentence has absolutely no meaning because rocks do not smell and, even if they could, they couldn't smell a color that doesn't exist.

But the form works with other words:

A cat smelled the blue fish

Related issues with English (which may or may not be next in your class) are sentences with an ambiguous meaning but perfectly fine syntax. My personal favorite is:

Time flies like an arrow; fruit flies like a banana.

Figuring out the double meaning here is left as an exercise to the reader.