#HTML Pages

11 messages · Page 1 of 1 (latest)

junior citrus
#

Hey there, I was wondering how I can make different pages within an HTML. In Twine, you can make links to other passages within the HTML. I was wondering how I can do that via HTML, and I'm also using CSS if that helps. Thank you!

latent tinsel
#

You want to link to other pages or do you want to link to different parts of the same page?

junior citrus
#

Well I want all of the pages to be in the same HTML, if that's possible. There'd be multiple pages, so I guess links to other pages.

#

I think that's how Twine does it...

latent tinsel
#

Without JavaScript you can't make a single HTML file that contains multiple pages

#

You can have one really long page and link to sections of that page

junior citrus
#

How do I divide the page into sections then?

latent tinsel
#

Well that's up to you. You'd create links by giving an a tag an id and then linking to it from the href using a #id as the URL

<a id="example">Example Anchor</a>

You can then create a link to that like this

<a href="#example">Links to the example anchor</a>
junior citrus
#

If I wanted to use JavaScript for multiple pages, how would I go about that?

#

Are there any guides for that?

latent tinsel
#

I don't know of any. It's a bit more advanced but it falls in the category of SPA's (single page apps), so that might be worth googling.