0

First of all sorry is the question seems dumb, but I don't know how to search for it. If I want to create a simple website from scratch, without an auto management system or anything like that, just a plain website with a home, about us, portfolio and contact page, which is the best way of doing it?

I mean, I know HTML, Javascript, and CSS (the essential minimum to create a simple website). If I have to create a website like I described before, should I simply create all four .html files, and add the markup, CSS, and js if needed and that's it? Is that the procedure web developers follow when doing simple websites for their clients?

Thanks and sorry again if the question is inappropriate.

Dale
  • 1,613
  • 4
  • 22
  • 42
ALSD Minecraft
  • 1,421
  • 3
  • 12
  • 18
  • I think this question is technically inappropriate as it is a discussion question and not a question with a true answer. That said, I think that if four simple html files will take care of all of the client's needs (plus any css and js files) than hey that's all you need to create. It really all depends on the client's goals. – James Hamann May 16 '16 at 05:31
  • @JamesHamann thanks for the answer, I know it's kind of a discussion question, so I just wanted to get it answered as a "What's the standard procedure to created a single 4-page fixed website", for example, to avoid repeating the header/footer, etc. – ALSD Minecraft May 16 '16 at 05:33
  • Do you know any php? You can avoid repeating header and footer if you know a little php. I mean there's other ways too but I use php often when I'm creating templates. – James Hamann May 16 '16 at 05:41
  • The basics, I know I can use includes, but what if I want to add a class `active` to the `
      `, how do I change it in every page if I have the header in a single PHP?
    – ALSD Minecraft May 16 '16 at 05:48
  • Like the main navigation
      ? Well, if a single header.php file is being included in all your pages then editing that file will show the added class on every page.
    – James Hamann May 16 '16 at 05:52
  • Yes, but I'd want to have the same menu, but the class `active` added just to the actual page. So, if the current page I am is about-us, the `
  • ` with about us should have `class="active"` and the others not, but if the page is portfolio, the portfolio `
  • ` should have a `class="active"` and the others not, do you understand? Sorry I suck at explaining ):
  • – ALSD Minecraft May 16 '16 at 06:02
  • @ALSDMinecraft, you could include menu.php on page. Before you include it, create variable $page, which will store page name. Inside menu.php check var $page, and add appropriate class.... However, no need for php at all in this case.... – sinisake May 16 '16 at 06:08
  • I get what you are saying. Well there are lots of ways to do that, but I can't write the code for you. I'd suggest looking at [this question thread](http://stackoverflow.com/questions/7566238/how-to-make-css-aactive-work-after-the-click) for some info, and others like it. Personally I'd use Jquery to add a class if the href of the link equals the url. And no, you don't suck at explaining. – James Hamann May 16 '16 at 06:10
  • @JamesHamann ok thanks then, I'll be using jQuery if it's correct to do it that way (it's easy for me to use jquery / js than php). – ALSD Minecraft May 16 '16 at 06:14
  • @nevermind you mean PHP is not necessary because I can use JS right? – ALSD Minecraft May 16 '16 at 06:14
  • @ALSDMinecraft, no, you have to create 4 simple pages, you can do it in html (add class active to li on specific page), without using of php, or javascript... And, there is no 'correct way', that's the point.... – sinisake May 16 '16 at 06:19
  • @nevermind, but if the client wanted to change the menus or add new submenus and stuff all the time, it would be a lot of work doing it that way – ALSD Minecraft May 16 '16 at 06:25
  • Then it is not static website, use php.... – sinisake May 16 '16 at 06:28