How do I get free domain and free hosting to put my website online?

I want to start my website but now I am a beginner, so I want to test my website on it by taking free hosting first. Can anyone tell me where can I buy the best free web hosting.