A man who posted "despicable" comments on his Facebook page about the missing five-year-old April Jones has been jailed for 12 weeks.

Matthew Woods, 19, from Chorley, Lancashire, made derogatory posts about April and missing Madeleine McCann after getting the idea from Sickipedia, a website that "trades in sick jokes".

Among his comments was: "I woke up this morning in the back of a transit van with two beautiful little girls, I found April in a hopeless place." Another read: "Who in their right mind would abduct a ginger kid?"

Others stated: "I love April Jones" and "Could have just started the greatest Facebook argument ever. April Fools, Who Wants Maddie?"

He also wrote comments of a sexually explicit nature about April, who went missing last week from near her home in Machynlleth, mid-Wales.

Woods, who is unemployed, was arrested for his own safety on Saturday night and was remanded in custody before his appearance at Chorley magistrates court on Monday, where he pleaded guilty to sending a message or other matter that is grossly offensive by means of a public electronic communications network.

The chairman of the bench, Bill Hudson, said Woods's comments were so serious and "abhorrent" that he deserved the longest sentence they could pass, less a third, to give credit for his early guilty plea.

Hudson said: "We have listened to the evidence in what can only be described as a disgusting and despicable crime and the bench finds was completely abhorrent. The words and references used to the current case in Wales and that of the missing girl in Portugal are nothing less than shocking, so much so that no right-thinking person in society should have communicated to them such fear and distress."

He added that families involved in such cases should not have to be subjected to this type of misuse of social media.

Only a custodial term in a young offender institute was appropriate, Hudson said, which was greeted by applause from about 30 people in the public gallery.

He added: "The reason for the sentence is the seriousness of the offence, the public outrage that has been caused, and we felt there was no other sentence this court could have passed which conveys to you the abhorrence that many in society feel this crime should receive."

Woods smirked as members of the public clapped as he was led from the dock.