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
Welsh holiday makers have been caught up in travel chaos after British Airlines cancel all flights from Heathrow and Gatwick.
A schoolgirl from Pontypridd is back home after being honoured for her fundraising efforts at a star studded ball in London.
UK terrorism threat reduced just a week before Cardiff hosts the Champions League final.