- Linking html pages together using anchor (
<a>
) tags.
"It’s not unusual to find bookmarks left in a library book, but this time you've found a letter."
That is the beginning of our story. How will it end? How will it even middle? It's UP TO YOU.
What we'll be making today is a Choose Your Own Adventure story. In HTML. With links!
Our project will consist of a series of .html pages that we can link together using anchor tags.
Each page after the first one will:
- have a unique filename ending with
.html
. - have the same title in its
<title>
tag as every other page. - have, as its heading, the text of the anchor tag from the previous page that the user clicked on to get to this page. If you look at our index.html, we have a link that says, "You take the letter out of the book." That is also the heading of letter.html, and that's the connection that should exist between every pair of linked pages.
- have some "main text" that describes what happens once the user takes the action that got them there.
- have at least one link (but preferably more!) that describes a possible action.
- have a link that opens a new window/tab and leads to the GitHub repo for your app.
Any pages COULD have, but do not HAVE TO have:
- a link back to the first page
- an image
- basically whatever else you want
- There is no minimum or maximum on the number of pages to make. Whatever feels done for the story you're telling.
- But however many pages it ends up being,
commit
for every completed page.
How the story progresses from that initial page is totally up to you, as is its length. There are no stretch goals here, per se; just keep making pages that expand your story!
Some content guidelines:
- As always, keep it SFW.
- You should whenever possible branch out and give the user at least two choices for how to progress.
- We don't know what the letter is yet, what it says, or who wrote it. But we can be imaginative with other questions too. Where is the library? What kind of library is it? What is the main character doing in the library? Who even is the main character? Have fun with this!
Good luck!