Checkpoint: your first page
Learn
On your own this time
Four problems that use everything so far: HTML elements and attributes, CSS rules and flexbox, and JavaScript values, variables and template literals. No hints until your first check. Read each task twice; the details are part of it.
Cleared it? The Bill splitter and the One-question quiz projects are the next step, and both are free.
Checkpoint
A profile card
Build a profile card inside the <div class="card">:
- an
<h2>with the namePriya Shah - an image from
/assets/noodle/coding.svg, 100 pixels wide, with useful alt text - a paragraph about her (any text)
- a link with the text
Listen on her pagethat goes tohttps://example.com/priya
Then style .card with 16px of padding and a 2px solid border in any colour.
On your own: hints appear after your first check, a solution after 3 checks or if you give up.
<style> </style> <div class="card"> </div>
Checkpoint
A row of links
The three links in the nav list sit on top of each other. Make the <ul> a flex row with a 12px gap, and remove its bullets with list-style: none. Leave the HTML as it is.
On your own: hints appear after your first check, a solution after 3 checks or if you give up.
<style>
</style>
<nav>
<ul class="menu">
<li><a href="/">Home</a></li>
<li><a href="#music">Music</a></li>
<li><a href="#gigs">Gigs</a></li>
</ul>
</nav>
Checkpoint
A receipt line
In the script, store the buyer's name Mia, the number of tickets 2 and the price 7.5 in three variables. Work out the total in a fourth variable (let JavaScript do the maths), then print exactly:
Mia: 2 x 7.5 = 15
Constraint
- Let JavaScript work out the 15.
On your own: hints appear after your first check, a solution after 3 checks or if you give up.
<script> // your variables, then one console.log </script>
CheckpointPredict the output
Lives after a hit
What does this page print in the console?
Read the program, type exactly what it prints, then lock it in. It runs after that.
<script>
let lives = 3;
lives -= 1;
console.log("Lives: " + lives + 1);
console.log(`Lives: ${lives + 1}`);
</script>
Cleared
Go back to
You can now
Save your progress to a free account
Next up: Core, with Premium
Make JavaScript decide, repeat and organise: conditions, loops, functions, arrays and their methods, objects, and reading error messages.
- 08if, else and comparing things
- 09Loops: doing things again
- 10Functions and return
- 11Arrays and their methods
- 12find, sort and reduce
- 13Objects: grouping data
- 14Reading errors and debugging
- 15Checkpoint: JavaScript logic
Premium is £7.99 a month or £59 a year and opens every lesson after Foundations, in all four courses. What is included