Hi I am new to web programming. I want to create a template sort of css where all the pages look the same except the content of the pages.
So I have a logo and some tabs at the top where you can navigate the website, but the content of the pages would be different (contact, about, info.etc).
How do I go about creating this template?
You might want to try building your template page in plain HTML + CSS, and then using simple PHP includes to build your pages. You could, for example, break your page into two separate files:
header.php:
and footer.php:
And then, for any files that use that template, you’d use something like this:
So then if someone visited the previous file (let’s say it’s called index.php), then the files would be assembled and the final HTML output would look something like:
Just make sure you have PHP running on your server, or this won’t work at all. Also, if you want to develop your site locally, I’d recommend using XAMPP to get a local Apache host.