← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 330 · 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: <img src="cat.png"> goes in style.css. (a) True (b) False
  2. 2.🛡️ Online: is it safe to use a strong password? (a) not safe (b) safe
  3. 3.🌐 Which one saves our .html files? (a) a web server (b) a web browser (c) a code editor
  4. 4.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) magenta (c) blue (d) black
  5. 5.🧩 Which language changes the text size? (a) HTML (b) CSS (c) JavaScript
  6. 6.🔒 What does the lock (HTTPS) in the address bar mean? (a) the site is fast (b) the site is free (c) the data is scrambled (d) the site is a game
  7. 7.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <h3>Hello, world!</h3>
    <h2>Cricket is fun.</h2>
    <p>Fun facts</p>
    <h2>Fun facts</h2>
  8. 8.🔍 Which line is missing its closing tag?
    line 1: <u>Cricket is fun.</u>
    line 2: <h3>My pets</h3>
    line 3: <em>I love mangoes.
    (a) line 2 (b) line 1 (c) line 3
  9. 9.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h3> or <h6>? (a) <h2> (b) <h3> (c) <h4> (d) <h6>
  10. 10.⚡ What does this code print? (Look at the quotes!)
    let x = "5";
    let y = 6;
    console.log(x + y);
    (a) Error (b) 11 (c) 56
  11. 11.🌍 Which one sends the page back? (a) the URL (b) the browser (c) HTTPS (d) the server
  12. 12.🚀 Which file should this code go in: body { margin: 0; } (a) style.css (b) index.html (c) script.js
  13. 13.🎨 Which tag connects an outside CSS file? (a) <css> (b) <link> (c) <a> (d) <img>
  14. 14.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h4> or <h1>? (a) <h6> (b) <h4> (c) <h1> (d) <h3>
  15. 15.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  16. 16.True or false: “skipping heading levels” helps everyone use the page. (a) True (b) False
  17. 17.♿ A part of the page is under a <h2> heading. Which tag should its sub-heading use? (a) <h3> (b) <h5> (c) <h2> (d) <h1>
  18. 18.🔁 What does this code print?
    let score = 26;
    if (score > 42) {
      console.log("You win");
    } else {
      console.log("Play again");
    }
    (a) You win (b) Play again
  19. 19.🌈 Which colour is #00ffff? (a) bright green (b) cyan (c) red (d) blue
  20. 20.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) bright green (c) yellow (d) white
  21. 21.📋 Which list suits a shopping list in any order? (a) <hr> (b) <br> (c) <ol> (d) <ul>
  22. 22.✍️ CSS declarations go inside which brackets? (a) { } (b) < > (c) ( ) (d) [ ]
  23. 23.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 15; i = i + 4) {
      console.log(i);
    }
  24. 24.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h1> or <h4>? (a) <h5> (b) <h6> (c) <h1> (d) <h4>
  25. 25.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  26. 26.⚡ What does this code show?
    let name = "Arjun";
    console.log("Welcome, " + name + "!");
    (a) Welcome, name! (b) Arjun (c) Welcome, Arjun! (d) name
  27. 27.⚡ What does this code show?
    let name = "Arjun";
    alert("Hello, " + name + "!");
    (a) Hello, Arjun! (b) Hello, name! (c) name (d) Arjun
  28. 28.📊 Which tag gives the table a title? (a) <table> (b) <caption> (c) <tr> (d) <td>
  29. 29.Which of these is an empty tag? (a) <img> (b) <ul> (c) <title> (d) <h1>
  30. 30.⚡ What does this code show?
    let name = "Zoya";
    console.log("Hello, " + name + "!");
    (a) Hello, Zoya! (b) Zoya (c) Hello, name! (d) name
  31. 31.🖌️ What colour is behind the letters?
    h1 {
      font-size: 12px;
      color: white;
      background-color: black;
      text-align: left;
    }
    (a) orange (b) white (c) black
  32. 32.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 110px;
      justify-content: flex-end;
    }
    Inside are 2 boxes, each 50px wide (no margins).
  33. 33.Which of these is true of <main>? (a) sits at the very top (b) holds a side box of tips (c) holds the logo and title (d) holds the main content
  34. 34.🌗 Is blue on purple easy or hard to read? (a) easy to read (b) hard to read
  35. 35.📄 Which part holds everything you see on the page? (a) the head (b) the title (c) the doctype (d) the body
  36. 36.🏷️ HTML marks up text using ___. (a) wires (b) tags (c) keys (d) pixels
  37. 37.True or false: <meta charset="utf-8"> goes in the body. (a) False (b) True
  38. 38.🖌️ Which CSS property sets the letter colour? (a) text-align (b) background-color (c) color (d) font-family
  39. 39.📋 Does this list show bullets or numbers?
    <ul>
      <li>Guava</li>
      <li>Litchi</li>
      <li>Banana</li>
    </ul>
    (a) numbers (b) bullets
  40. 40.🧭 Which semantic tag holds the main content? (a) <footer> (b) <header> (c) <main> (d) <article>

Answer key

  1. False
  2. safe
  3. a code editor
  4. red
  5. CSS
  6. the data is scrambled
  7. 4
  8. line 3
  9. <h2>
  10. 56
  11. the server
  12. style.css
  13. <link>
  14. <h1>
  15. a closing tag
  16. False
  17. <h3>
  18. Play again
  19. cyan
  20. blue
  21. <ul>
  22. { }
  23. 12
  24. <h1>
  25. Yes
  26. Welcome, Arjun!
  27. Hello, Arjun!
  28. <caption>
  29. <img>
  30. Hello, Zoya!
  31. black
  32. 10
  33. holds the main content
  34. hard to read
  35. the body
  36. tags
  37. False
  38. color
  39. bullets
  40. <main>

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