The pair encouraged fans not to go out to help prevent the virus being spread.

Sir Elton John, David Beckham and Kevin Bacon have been sharing messages with the #IStayHomeFor hashtag amid the coronavirus outbreak urging people not to go out.

The stars have been encouraging fans to share similar messages on social media in a bid to prevent the spread of the virus.

Sir Elton shared a picture on Instagram of him holding a sign bearing the message while sitting in front of a snakes and ladders board.

Alongside the picture, the singer wrote: “#IStayHome for David Furnish and our boys.

“Today it’s snakes, ladders and staying inside to stop the spread of coronavirus.

“Who are you staying home for? Please post your own #IStayHomeFor photo with a sign like mine and tag six of your friends asking them to do the same.”

Beckham also shared an image of him holding a sign up for the camera with #IStayHomeFor written on it, saying that he is not going out because of his family.

The former footballer wrote on Instagram: “I’m staying home for Victoria and our kids, including Cruzie who’s made his way into this photo.

“Let’s stop the coronavirus spread together.

“Share your own #IStayHomeFor photo with a sign like mine and tag six of your friends asking them to do the same.”

Actor Kevin Bacon also shared a message urging people not to leave home.

In a video message posted on Twitter, Bacon said: “Right now like people around the world I’m staying home because it saves lives and it is the only way we are going to slow down the spread of this coronavirus because the contact that you make with someone who makes contact with someone else, that may be what makes somebody’s mum or grandpa or wife sick.

“Every one of us has someone who is worth staying home for and I am staying home for Kyra Sedgwick.”