Level 1: Easy (about 5-7 years old)
Here, we focus on something very basic where children can change text colors and sizes. It’s easy to understand, and they can quickly see how the changes affect the page.
Step 1. Paste the HTML code into the HTML box in CodePen.
<html lang=“sv”>
<head>
<meta charset=”UTF-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1.0″>
<title>My Colorful Webpage. Here you can choose to change the text.</title>
<link rel=”stylesheet” href=”style.css”>
</head>
<body>
<h1>Hello, glad you found this page!</h1>
<p>Change the colors (or maybe the text here?) and see what happens!</p>
</body>
</html>
Step 2. Do the same with the CSS code below.
body {
background-color: lightblue; /* Change the background color */
text-align: center; /* Center all text on the page */
}
/* Styles for headings */
h1 {
color: red; /* Change the heading color */
font-size: 40px; /* Change the size of the heading text */
}
/* Styles for paragraphs (p) */
p {
color: green; /* Change the text color */
font-size: 20px; /* Change the text size */
}
What the children can do:
Change the colors of the background and text by replacing the color names (e.g., from “red” to “blue”). Here are some color suggestions you can try:
- Lightpink – Light Pink
- Lightgreen – Light Green
- Yellow – Yellow
- Lightyellow – Light Yellow
- Orange – Orange
- Adjust the text sizes (font-size) to make the text larger or smaller.
Good luck!