They were also invited to join members of local mosques as they broke their daily fast.
Food was handed out outside Dewsbury Town Hall last Friday afternoon, August 17.
Muslims then broke their fast at Open Iftar events which non-Muslims were invited along to.
These were held throughout last week at the Salfia Mosque in Stoney Bank Street, Ravensthorpe, the Hanfia Mosque in Huddersfield and the Al-Hidayah Mosque in Caledonian Road, Savile Town.
The events came at the end of the month of Ramadan, which saw Muslims all over the world fast during daylight hours.
Part of the reason for fasting is to help Muslims develop concern for those less fortunate and during Ramadan they are required to donate a percentage of their earnings to charity.
The Ramadan For all events aimed to reach out to the neediest people in the local community.
They were able to take place thanks to generous donations from local mosques, and businesses.
Arshad Patel helped to organise the event at Dewsbury Town Hall, which had to move from outside Mochachino’s in Crackenedge Lane to cope with demand.
Volunteers took along donations of food and meals were served to the homeless.
Mr Patel said: “The main idea was to help the homeless and the needy in our local community.
“We had been to local homeless shelters and homeless projects to tried to help them with basic necessities.
“With Ramadan For All, we thought the local Muslim community could come together and provide the homeless with free food.”
As well as the homeless, members of the general public were also able to get free meals and find out more about Ramadan.
“It was a chance for us to mix and share our experiences with the general public and open our doors to them,” Mr Patel said.
“It was a day where we shared our experiences with everybody to create a better community.”
It is hoped that Ramadan For All will be held every year in future.
“This event will definitely take place every year,” Mr Patel said.
“But we will be helping existing projects as much as we can in the meantime.”