← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 301 · 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.🖌️ What colour are the letters?
    li {
      text-align: center;
      background-color: white;
      font-size: 40px;
      color: purple;
    }
    (a) purple (b) green (c) white
  2. 2.Which of these does HTML do? (a) rounds box corners (b) adds space around boxes (c) gives the page structure (d) reacts to a button click
  3. 3.💪 Which flexbox property turns on flexbox? (a) flex-direction (b) display: flex (c) justify-content (d) align-items
  4. 4.⚖️ What colour is the text of this element?
    <h1 class="menu" id="top">Hi</h1>
    CSS:
    .menu { color: blue; }
    .menu { color: green; }
    (a) blue (b) white (c) green (d) purple
  5. 5.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 3 (c) 6 (d) 2
  6. 6.Which of these is a strong password? (a) riya2014 (b) Blue@Tiger_74 (c) password (d) qwerty
  7. 7.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>Our school trip</p>
    <p>My pets</p>
    <h2>Good morning!</h2>
  8. 8.⚡ What number does this code print?
    let coins = 13;
    coins = coins + 5;
    coins = coins - 18;
    console.log(coins);
  9. 9.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h5> or <h4>? (a) <h5> (b) <h2> (c) <h6> (d) <h4>
  10. 10.True or false: in <img>, alt is read by screen readers. (a) True (b) False
  11. 11.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ol> (c) <ul> (d) <br>
  12. 12.True or false: to click prize links is not safe. (a) True (b) False
  13. 13.🖌️ Which CSS property colours behind the text? (a) background-color (b) font-weight (c) font-family (d) color
  14. 14.🌍 What finds the server for a domain name like example.com? (a) CSS (b) DNS (c) HTML (d) alt
  15. 15.🌈 Which colour of light is strongest in rgb(122, 167, 135)? (a) green (b) red (c) blue
  16. 16.🧩 Which language reacts to a button click? (a) CSS (b) JavaScript (c) HTML
  17. 17.🎯 What kind of selector is #top? (a) an element selector (b) an id selector (c) a class selector
  18. 18.🔗 Which tag makes a clickable link? (a) <link> (b) <p> (c) <img> (d) <a>
  19. 19.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it blank (d) makes it bold
  20. 20.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="300">
  21. 21.💬 Does the browser show comments on the page? (a) No (b) Yes
  22. 22.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 16; i = i + 4) {
      console.log(i);
    }
  23. 23.⚖️ What colour is the text of this element?
    <h2 class="note" id="top">Hi</h2>
    CSS:
    #top { color: purple; }
    #top { color: yellow; }
    (a) purple (b) blue (c) black (d) yellow
  24. 24.⚖️ What colour is the text of this element?
    <h1 class="red" id="logo">Hi</h1>
    CSS:
    h1 { color: black; }
    h1 { color: orange; }
    (a) purple (b) orange (c) blue (d) black
  25. 25.🎯 Which CSS selector matches this element?
    <span class="menu" id="main">Hello</span>
    (a) .main (b) #menu (c) .note (d) span
  26. 26.🔢 In a basic web page file, which comes first: “<head>” or “<html>”? (a) <head> (b) <html>
  27. 27.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) My drawings (b) index.html (c) My Hobbies (d) I like to read.
  28. 28.🔠 How many heading levels does HTML have? (a) 4 (b) 6 (c) 10 (d) 3
  29. 29.🧭 Is <article> semantic or not semantic? (a) not semantic (b) semantic
  30. 30.True or false: #logo is an id selector. (a) True (b) False
  31. 31.⚖️ What colour is the text of this element?
    <p class="star" id="hero">Hi</p>
    CSS:
    .star { color: blue; }
    .star { color: yellow; }
    (a) black (b) blue (c) yellow (d) white
  32. 32.🔗 Which address opens when you click this link?
    <a href="contact.html">Play games</a>
    (a) https://example.com (b) contact.html (c) Play games (d) maths.html
  33. 33.✍️ How does a CSS comment start? (a) /* (b) <!-- (c) # (d) //
  34. 34.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
  35. 35.🧩 Which language makes a form box? (a) JavaScript (b) HTML (c) CSS
  36. 36.🔍 Which is the odd one out? (a) has an address bar (b) opens web pages for us (c) turns HTML into a page (d) answers page requests
  37. 37.Which of these goes in the head? (a) <title> (b) <a> (c) <table> (d) <img>
  38. 38.True or false: <th> holds the whole table. (a) True (b) False
  39. 39.🖼️ Which attribute of <img> tells which image to load? (a) src (b) alt (c) width (d) height
  40. 40.Which of these is true of a web browser? (a) stores a website’s files (b) has an address bar (c) saves our .html files (d) colours code to help us

Answer key

  1. purple
  2. gives the page structure
  3. display: flex
  4. green
  5. 3
  6. Blue@Tiger_74
  7. 2
  8. 0
  9. <h2>
  10. True
  11. <ol>
  12. True
  13. background-color
  14. DNS
  15. green
  16. JavaScript
  17. an id selector
  18. <a>
  19. opens it in a new tab
  20. 300
  21. No
  22. 12
  23. yellow
  24. orange
  25. span
  26. <html>
  27. My Hobbies
  28. 6
  29. semantic
  30. True
  31. yellow
  32. contact.html
  33. /*
  34. in the head
  35. HTML
  36. answers page requests
  37. <title>
  38. False
  39. src
  40. has an address bar

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