T
T
Timofey Mikhailov2018-02-26 14:52:48
css
Timofey Mikhailov, 2018-02-26 14:52:48

And what is the correct principle of building an html page?

Actually, my question is this kind of ...
I'm making a website, and it has a vertical menu. How I implemented my page: The index.html
main page only has a vertical menu and an iframe that displays other pages. I've rummaged around the sites, and came to the conclusion that sites are not made using this method at all ... Please tell me how best to implement the transition between html pages? ps I had an idea that the site consisted of one index.html file. And the rest of the pages would be loaded into a div using JavaScript

. But it seems to me that in this case it will not be very convenient to correct errors ...

Answer the question

In order to leave comments, you need to log in

5 answer(s)
S
Stepan Krapivin, 2018-02-26
@JimmiJanger

Make one page with tabs "About the author", "Price" and "Contact", you will need some js-plugin for tabs.
Or even without js, you can make anchors.
The text of all sections will go in a row, just when you click on the "Price" item, the page will scroll to this section.

F
FeNUMe, 2018-02-26
@FeNUMe

You are right: no one has been connecting site blocks through iframe for 20 years already. In modern sites, blocks of the header, footer, menu, content are typeset separately and assembled into one page, but here is how there are already options:
SPA (Single Page Application) sites are also popular now, in the case of business cards, info is immediately loaded with the page, and there it is already “split” into sections using layout/js/css, in case of something more dynamic, info is loaded on the fly from js.

E
Egor Zhivagin, 2018-02-26
@Krasnodar_etc

Are you inventing a template engine? Google about them and layout in template engines
The menu is usually inserted into the layout (this is a wrapper for all pages), header and footer are also there

T
tyzberd, 2018-02-26
@tyzberd

your gulp + gulp-nunjucks-render
https://zellwk.com/blog/nunjucks-with-gulp/

X
xmoonlight, 2018-02-26
@xmoonlight

I had an idea that the site consisted of one index.html file. And the rest of the pages would be loaded into divs using JavaScript. But it seems to me that in this case it will not be very convenient to correct errors ...

Try my creation: includeHTML (I use it for SPA)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question