Free

5: Creative Projects

⏱️ 65-80 minutes
📊 intermediate

Chapter 19: "Creating Our Mini-Website"

The next day, Alice came to Professor Bit with shining eyes.

— Professor, I came up with a branching story about time travel! — she exclaimed. — But how do I share it with friends? Not everyone will like typing commands in the console.

The Professor smiled:
— Great question, Alice! And I have a wonderful solution — we'll create a web page with your story. This will be your first mini-website!

Byte joyfully spun around:
— Web development is one of the most popular areas of programming! You can create websites that the whole world will see!

— Where do we start? — Alice asked.

— Websites are created using three main languages, — the Professor explained, opening a laptop. — HTML handles structure and content, CSS handles appearance, and JavaScript handles interactivity.

HTML, CSS and JavaScript: structure, style and behavior of a website

Три языка — три верных друга:
Один кладёт каркас и свод,
Другой раскрашивает стены,
А третий оживляет ход.

HTML — и кости, и основа,
CSS — наряд, палитра, свет,
JavaScript — живое слово,
Что отвечает «да» и «нет».

Страница — дом в большом просторе,
Где код становится окном.
Ты строишь сайт — и в этом доме
Друзьям найдётся тёплый дом.

The Professor opened a simple text editor and began writing:

html



My First Web Page




Time Travel




You discover a strange device in the basement of an old house. It
looks like a pocket watch, but with many buttons and dials.
Suddenly the device begins to glow!


What will you do?








— Wow! — Alice exclaimed, looking at the screen. — This code looks more complex than what we did before.

— Don't worry, — the Professor reassured her. — Let's break it down by parts. At the beginning we have the HTML structure — it's like the skeleton of our page:

html



My First Web Page






— HTML consists of tags marked by angle brackets, — the Professor continued. — For example,

denotes a first-level heading,

— a paragraph of text,



— Now we have a button to turn background music on/off, — the Professor explained. — This is important, as not all users want to hear music when visiting a site.

— How great! — Alice admired. — Can we add inventory, like in our text game?

— Great idea! — the Professor smiled. — Let's create a separate block for inventory and variables in JavaScript to store items:

html


Time Travel


id="inventory"
style="background-color: #f0f0f0; padding: 10px; margin-bottom: 15px; border-radius: 5px;"
>

Inventory:


Empty








— Now the player can find items during the story, and they will be displayed in the inventory, — the Professor explained. — These items can affect further events, as we did in the text version.

— Can such a site be published so my friends can play it? — Alice asked.

— There are several ways, — the Professor replied. — The simplest is to use free hosting services like GitHub Pages, Netlify, or Vercel. You upload your files to these platforms, and they make your site available on the internet.

— But remember about security, — Logic warned. — Don't include personal information on your site and always ask parents' permission before publishing anything on the internet.

— Creating websites is a huge field with many possibilities, — the Professor summarized. — We've only touched the basics, but even with this knowledge, you can already create interesting projects. As you study HTML, CSS, and JavaScript, you'll be able to make increasingly complex and beautiful sites.

Task

Take your interactive story from the previous chapter and create a web version using HTML, CSS, and JavaScript. Add styling to make it visually appealing, include at least one image, and consider adding sound effects or background music. If possible, publish your site using a free hosting service and share the link with friends.