Well, the short answer is yes you can build a website without hosting. However, if you are a beginner I would not recommend it, as setting up your computer to work as a hosting server can be very technical.