Is it good to tell a joke in a class?
You know, it depends.
In general, if the students are kids, I think you should not tell any joke, BUT if the class is being carried out properly, you can say something funny or a little joke, to break the ice and have them participate more with their contributions.
Sometimes it’s even recommended: you could have reprimanded so hard and there's too much tension in the class and you want to implement discipline and a sound class management, it may be recommended to say something funny.
Anyway, in any case better be prudent and cautious: as we say in Spanish, you give them the edge of the sleeve but they take all the sleeve (“les das la manga y te toman el brazo”).
Finally and so as to finish: if the students are adults and things are going smooth, from time to time you can tell a small joke, and return to the lesson again. / Photo from: snow-alhambra objetivo granada ideal es. again the photo is just illustration