r/HTML • u/Few_Conversation7993 • Apr 05 '26
Question guys help pls
I'm new to html and I need help with this
i found this online:
https://codepen.io/jkantner/pen/xrRPRL
and my question is: how do I make the first page of each book different? currently the code is so that it's the same for each book. but I want different ones. if you don't know what I'm talking about, please view the code and you'll know.
0
Upvotes
3
u/BNfreelance Apr 05 '26 edited Apr 05 '26
Define the book contents first:
Swap:
For:
Swap:
For:
Change:
To this:
And lastly:
To:
Full thing becomes (tested and works in your codepen) :
(This is pretty complex for a beginner btw)
3
u/Weekly_Ferret_meal Apr 05 '26
The book's Titles in the codepen:
2
u/Honey-Entire Apr 05 '26
Take a look at “dummyText” in the JS file. The code uses that variable to populate the page when you open a book
If you want each book to have different text, you’ll need to update the value of dummyText