← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 72 · 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.Which of these is a closing tag? (a) <h1> (b) <p> (c) </title> (d) <li>
  2. 2.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  3. 3.⚡ What does this code show?
    let name = "Aman";
    console.log("Well done, " + name + "!");
    (a) Well done, Aman! (b) Aman (c) Well done, name! (d) name
  4. 4.🔍 Which is the odd one out? (a) shows line numbers (b) colours code to help us (c) has an address bar (d) is where we type code
  5. 5.🌈 Which hex code is blue? (a) #00ff00 (b) #0000ff (c) #00ffff (d) #000000
  6. 6.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    <!-- <p>Rain today</p> -->
  7. 7.🎨 What does CSS stand for? (a) Computer Style Sheets (b) Creative Sheet System (c) Colourful Site Styles (d) Cascading Style Sheets
  8. 8.♿ Which link text is clearest? (a) Read the fruit facts (b) link (c) click here (d) here
  9. 9.⚡ Which JavaScript word runs code when true? (a) alert() (b) if (c) let (d) console.log()
  10. 10.📄 What is the first line of an HTML5 page? (a) <body> (b) <!DOCTYPE html> (c) <head> (d) <html>
  11. 11.🔍 One closing tag is missing. Which one?
    <b>I love mangoes.
    <p>Cricket is fun.</p>
    <i>My best friend</i>
    (a) </p> (b) </em> (c) </b> (d) </i>
  12. 12.True or false: <img> goes in the body. (a) False (b) True
  13. 13.Which of these is an empty tag? (a) <p> (b) <b> (c) <title> (d) <input>
  14. 14.📊 In a table, which tag is a row? (a) <tr> (b) <td> (c) <th> (d) <tb>
  15. 15.💪 Which flexbox property picks row or column? (a) display: flex (b) gap (c) align-items (d) flex-direction
  16. 16.🚀 Which file is best for the colours and fonts? (a) script.js (b) photo.jpg (c) index.html (d) style.css
  17. 17.🔗 Which words do you click on?
    <a href="art.html">Take the quiz</a>
    (a) Take the quiz (b) Play games (c) href (d) art.html
  18. 18.Which of these is a strong password? (a) 123456 (b) 111111 (c) S0lar!Pen#8 (d) password
  19. 19.Which of these is not safe to do online? (a) tell a trusted adult (b) ask before downloading (c) think before you post (d) type a password on http
  20. 20.🔁 How many times does this code print “Hi”?
    for (let i = 1; i <= 4; i++) {
      console.log("Hi");
    }
  21. 21.✍️ Which property is set to yellow in this rule?
    h2 {
      font-style: italic;
      background-color: yellow;
      color: red;
    }
    (a) margin (b) yellow (c) background-color (d) padding
  22. 22.⚡ What does this code show?
    let name = "Arjun";
    console.log("Hi, " + name + "!");
    (a) name (b) Arjun (c) Hi, name! (d) Hi, Arjun!
  23. 23.📊 How many cells does this table have in all?
    <table>
      <tr><td>Orange</td><td>Papaya</td><td>Mango</td></tr>
      <tr><td>Grapes</td><td>Orange</td><td>Mango</td></tr>
    </table>
  24. 24.True or false: <hr> has a closing tag. (a) True (b) False
  25. 25.True or false: <img src="cat.png"> goes in style.css. (a) False (b) True
  26. 26.🛡️ Is it safe to use the same password on every site? (a) Yes (b) No
  27. 27.True or false: in <img>, width sets how tall it is. (a) False (b) True
  28. 28.🌗 Is dark grey on white easy or hard to read? (a) easy to read (b) hard to read
  29. 29.⚡ Which JavaScript word makes a new variable? (a) console.log() (b) for (c) alert() (d) let
  30. 30.💬 Which text will NOT show on the page?
    <!-- <p>My best friend</p> -->
    <p>Fun facts</p>
    <p>I love mangoes.</p>
    (a) My best friend (b) Fun facts (c) I love mangoes.
  31. 31.True or false: <link rel="stylesheet"> goes in the body. (a) True (b) False
  32. 32.Which of these is an opening tag? (a) </h1> (b) </title> (c) </p> (d) <p>
  33. 33.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Easy snacks (b) Here is my best one. (c) index.html (d) Art Gallery
  34. 34.🌈 In #000048 the blue part is the hex number 48. What is it as a normal number?
  35. 35.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 50px;
      padding: 5px;
      border: 4px solid black;
      margin: 15px;
    }
  36. 36.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h2> or <h6>? (a) <h2> (b) <h1> (c) <h5> (d) <h6>
  37. 37.🔁 What does this code print?
    let age = 33;
    if (age >= 8) {
      console.log("teen");
    } else {
      console.log("child");
    }
    (a) teen (b) child
  38. 38.💪 How much empty space (px) is left after the last box?
    .row {
      display: flex;
      width: 170px;
      justify-content: flex-start;
    }
    Inside are 4 boxes, each 40px wide (no margins).
  39. 39.📋 What number does the browser show next to “Mango”?
    <ol start="3">
      <li>Litchi</li>
      <li>Grapes</li>
      <li>Mango</li>
    </ol>
  40. 40.Which of these is an opening tag? (a) <h1> (b) </title> (c) </li> (d) </p>

Answer key

  1. </title>
  2. an opening tag
  3. Well done, Aman!
  4. has an address bar
  5. #0000ff
  6. 3
  7. Cascading Style Sheets
  8. Read the fruit facts
  9. if
  10. <!DOCTYPE html>
  11. </b>
  12. True
  13. <input>
  14. <tr>
  15. flex-direction
  16. style.css
  17. Take the quiz
  18. S0lar!Pen#8
  19. type a password on http
  20. 4
  21. background-color
  22. Hi, Arjun!
  23. 6
  24. False
  25. False
  26. No
  27. False
  28. easy to read
  29. let
  30. My best friend
  31. False
  32. <p>
  33. Art Gallery
  34. 72
  35. 98
  36. <h1>
  37. teen
  38. 10
  39. 5
  40. <h1>

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