🎙️
9

I tried to build a simple website for my sister's bakery in Portland last month.

At first, I just wrote all the HTML in one huge file and it was a mess. After a week, I learned about splitting it into separate files for the header, main content, and footer. I used the 'include' function in PHP to put it all together. Now it's way easier to change the menu on every page at once. Has anyone else found a better way to handle this for a small site?
3 comments

Log in to join the discussion

Log In
3 Comments
mary_foster92
Way simpler" until you need to change that header in 20 places.
6
kevinrivera
Splitting the HTML into separate files is a solid move. I read a blog post that called that exact method the "include method" and said it's a perfect first step for small sites. It beats having one giant file every time.
4
uma_martinez
Sure, but that just adds more HTTP requests and can slow things down. A single file is way simpler to manage for something truly small.
1