Prosecutor Linda Baker told the court that following a complaint to police, other offensive tweets by Robert Riley came to light.
Among them were messages about the missing Malaysian plane, the Korean ferry disaster and champion tennis player Serena Williams.
More top news
In the second of our special series Welsh education: Making the grade? we visited Bishop Hedley High in Merthyr Tydfil.
More wintry showers will continue overnight and a yellow warning of ice has been issued for central and eastern parts.
Swansea Dry Dock says it's missed out on a number of contracts to dismantle warships because they've gone elsewhere.