← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 649 · 40 questions
TalentJR

Code tip (Read it like a browser): Find the topic: HTML, CSS, JavaScript or how the web works. Read the code line by line, the way a browser would. For sums and loops, write each step down and check it again.

NameDateTime takenScore ___ / 40
  1. 1.True or false: in <img>, src names the picture file. (a) True (b) False
  2. 2.🛡️ Online: is it safe to click prize links? (a) safe (b) not safe
  3. 3.💬 Why do coders write comments? (a) to show pictures (b) to add colour (c) to make links (d) to leave notes
  4. 4.True or false: <ul> is one item of a list. (a) False (b) True
  5. 5.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “</head>”? (a) </head> (b) <!DOCTYPE html>
  6. 6.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 100px;
      padding: 5px;
      border: 4px solid black;
      margin: 5px;
    }
  7. 7.🔗 Which words do you click on?
    <a href="quiz.html">Maths fun</a>
    (a) href (b) quiz.html (c) Maths fun (d) Art corner
  8. 8.🌈 Which hex code is black? (a) #00ffff (b) #0000ff (c) #000000 (d) #ffff00
  9. 9.🔤 In “HTML”, what does the M stand for? (a) Machine (b) Mouse (c) Modern (d) Markup
  10. 10.📱 Which tag helps phones show a page at the right size? (a) the title tag (b) the br tag (c) the hr tag (d) the viewport meta tag
  11. 11.True or false: padding is the line round the box. (a) True (b) False
  12. 12.🔁 What does this code print?
    let marks = 33;
    if (marks >= 17) {
      console.log("Pass");
    } else {
      console.log("Try again");
    }
    (a) Try again (b) Pass
  13. 13.🖌️ How big is the text, in px?
    p {
      font-size: 12px;
      background-color: green;
      color: purple;
      text-align: left;
    }
  14. 14.📋 Which tag goes around each item of a list? (a) <ul> (b) <li> (c) <p> (d) <ol>
  15. 15.💪 Which flexbox property spaces boxes along a row? (a) align-items (b) display: flex (c) gap (d) justify-content
  16. 16.True or false: <input type="radio"> lets you pick only one. (a) False (b) True
  17. 17.📋 Which list tag is an ordered list? (a) <ol> (b) <ul> (c) <li>
  18. 18.⚖️ What colour is the text of this element?
    <p class="note" id="top">Hi</p>
    CSS:
    #top { color: orange; }
    #top { color: red; }
    (a) white (b) red (c) blue (d) orange
  19. 19.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ul> (c) <br> (d) <ol>
  20. 20.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) width (c) src (d) alt
  21. 21.🔗 Which words do you click on?
    <a href="art.html">Play games</a>
    (a) art.html (b) About us (c) href (d) Play games
  22. 22.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <p>Hello, world!</p>
    <p>Good morning!</p>
    <h2>The red kite</h2>
    <h2>Good morning!</h2>
  23. 23.True or false: body is an id selector. (a) True (b) False
  24. 24.📝 Which tag makes a drop-down list? (a) <ul> (b) <select> (c) <ol> (d) <li>
  25. 25.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
    <!-- <p>My pets</p> -->
    (a) Our school trip (b) Cricket is fun. (c) My pets
  26. 26.🧭 Which semantic tag sits at the bottom? (a) <nav> (b) <main> (c) <footer> (d) <article>
  27. 27.🔗 Where does this link open?
    <a href="about.html" target="_blank">Contact us</a>
    (a) in the same tab (b) in a new tab
  28. 28.💪 How much empty space (px) is left after the last box?
    .row {
      display: flex;
      width: 180px;
      justify-content: flex-start;
    }
    Inside are 2 boxes, each 80px wide (no margins).
  29. 29.🔢 To build and share your first web page, what comes right after “write the HTML”? (a) test in a browser (b) publish it online (c) add CSS styles (d) plan what to show
  30. 30.True or false: the browser shows the page to you. (a) False (b) True
  31. 31.🔒 Is the connection to this address scrambled (encrypted)?
    https://www.example.com/about.html
    (a) Yes (b) No
  32. 32.🖌️ Which CSS property makes letters bigger? (a) color (b) font-size (c) text-align (d) font-weight
  33. 33.⚖️ Two rules with the same selector set a colour. Which one wins? (a) neither (b) the first one (c) the later one (d) the shorter one
  34. 34.🌍 What does a web address (URL) tell the browser? (a) how old you are (b) where the page is (c) the page colour (d) your password
  35. 35.True or false: to check for https first is safe. (a) False (b) True
  36. 36.True or false: the border is the line round the box. (a) True (b) False
  37. 37.✍️ What value is given to font-size in this rule?
    li {
      margin: 10px;
      width: 300px;
      font-size: 20px;
    }
    (a) 20px (b) font-size (c) yellow (d) center
  38. 38.True or false: img is an element selector. (a) True (b) False
  39. 39.🌈 In #300000 the red part is the hex number 30. What is it as a normal number?
  40. 40.🔁 How many times does this code print “Hello”?
    for (let i = 2; i <= 10; i++) {
      console.log("Hello");
    }

Answer key

  1. True
  2. not safe
  3. to leave notes
  4. False
  5. <!DOCTYPE html>
  6. 128
  7. Maths fun
  8. #000000
  9. Markup
  10. the viewport meta tag
  11. False
  12. Pass
  13. 12
  14. <li>
  15. justify-content
  16. True
  17. <ol>
  18. red
  19. <ol>
  20. width
  21. Play games
  22. 3
  23. False
  24. <select>
  25. My pets
  26. <footer>
  27. in a new tab
  28. 20
  29. add CSS styles
  30. True
  31. Yes
  32. font-size
  33. the later one
  34. where the page is
  35. True
  36. True
  37. 20px
  38. True
  39. 48
  40. 9

Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids