HTML: how to make links change only part of the website | Sololearn: Learn to code for FREE!


HTML: how to make links change only part of the website

I created a basic structure of the webpage with top menu and left-hand menu bars. The middle of the screen is the section, which I want to change based on what link we click in either of the menus. I used CSS properties float:right and overflow: hidden to style the website. I don't want to create many .html files, like: index.html, about.html, contact.html. Instead I'd like only the middle HTML section to change and I'd like to keep it within one HTML file. In MVC this can be done using _layout, where I place @RenderSection - to render individual section within the main _layout. There must be a simple way to do this in pure HTML, is there? I kindly ask the great people here on SoloLearn to help and advise / point me in the right direction.

7/23/2019 8:02:27 AM


5 Answers

New Answer


Be language specific though i'm familiar with this in django and your question sounds like you're working with django but you want an answer to be in pure HTML which i believe it's not possible except with some backend languages like py or c++


Your solution is part of the MVC and in V to be precise which i believe is a backend stuff


Really? I mean there must be a way to do it with just HTML. No, I don't use any back-end for this. Just a pure website built using html css js. I mentioned MVC, which is (C#), but this is not the point. It was just a reference.


After searching extensively, I finally found it. This is what I had in mind: Eh, couldn't someone just post something helpful that makes sense? Anyway, I guess it's solved.


Right. That is correct. Yet... I'm not looking for MVC solution. Forget MVC. No backend. I built a pure html webpage and I wonder if I can have one file (let's say index.html) where I change the main section of the page depending which link from the menu was clicked. How can I do that?